This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [patch, fortran] Handling of .and. and .or. expressions
On 06/11/2018 09:22 PM, Thomas Koenig wrote:
What it does not do is one part of PR 57160, i.e. warn against
if (a /= 0 .and. 1/a > 5) which people who are used to C might
also like to write
Even die-hard Fortran programmers make these kinds of mistakes. Digital
Equipment Fortran found the following error (simplified for display
purposes) for us, by crashing the executable with a Segmentation Fault:
SUBROUTINE AAP(A, N, I)
C Let's try this with I greater than N:
DIMENSION A(N)
IF (I .LE. N .AND. A(I) .GT. 0.0) PRINT*, A(I)
END
in 1992. It had been part of our production code by that time for years ...
--
Toon Moene - e-mail: toon@moene.org - phone: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
At home: http://moene.org/~toon/; weather: http://moene.org/~hirlam/
Progress of GNU Fortran: http://gcc.gnu.org/wiki/GFortran#news