* Fortran 90 and check_bounds
@ 2000-06-20 7:43 Holger Bauer
0 siblings, 0 replies; only message in thread
From: Holger Bauer @ 2000-06-20 7:43 UTC (permalink / raw)
To: tru64-unix-managers
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 |
------------------------------------------------
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-06-20 7:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-06-20 7:43 Fortran 90 and check_bounds Holger Bauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox