From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96148706719457.tru64-unix-managers.marc@archive.invalid> From: Holger Bauer Date: Tue, 20 Jun 2000 07:43:36 +0000 To: tru64-unix-managers Subject: Fortran 90 and check_bounds X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96148706719457 The following message is a courtesy copy of an article that has been posted to comp.lang.fortran as well. Suppose the following code (with NB(L)=0) ....(L,MAXL,NB,IBC) INTEGER :: NB(MAXL),IBC(6) IF(NB(L).GT.0.AND.IBC(L).EQ.3)THEN ... ELSE ... ENDIF The code does NOT run on Tru64Unix and SGI IRIX64 if the check_bounds option is set AND NB(L) is equal to zero. (using 5.3 Version of the Compaq compiler) It is clear to me, that 0 then is NOT a valid subscript for the array IBC (IBC(0)). However, my understanding of Fortran (and other languages) was that logical expressions with the same prioriy are parsed from left to right and the compiler will NOT evaluate the remaining expressions once the whole expression will already be .FALSE. (as it will be with the NB(L).GT.0.AND. subexpression. Since we have many of these expressions in our code (and this was NEVER a problem with F77 with check_bounds) I ask myself if this is a compiler bug or this is according to the F90 specifications. Regards, Holger ------------------------------------------------ | Holger Bauer | Univ. of Stuttgart, ITSM | ------------------------------------------------