g77 compiles illegal code in testsuite?
Steven G. Kargl
kargl@troutmask.apl.washington.edu
Fri May 23 15:15:00 GMT 2003
Bud Davis said:
> | I'm running the Fortran 77 code in gcc-testsuite-3.3.tar.bz2
> | through g95 and I've found that 20000601-2.f contains
> | illegal code for Fortran 95 and probably Fortran 77. I don't
> | have the Fortran 77 standard handy, but I believe the code is
> | illegal; yet g77 compiles the code without warning or error.
>
[Table of intrinsics snipped]
> In my interpretation, the code in question is not valid.
> MAX is the generic name for MAX0,AMAX1, and DMAX1,
This is correct.
> not for AMAX0 which is the specfic intrinisic needed here.
Actually, I beleive AMAX0 would also be wrong. The arguments
of AMAX0 must have the same type.
>
> Maybe g77 should issue a warning (when invoked with -fpedantic) ?
>
It's Toon's call, but I think g77 should issue an error and
abort. The g77 info contains a -fno-ugly-args option. I
would think you should need -fugly-args to compile the code
in question.
> Of course, IMHO, g95 should be backwards compatable with g77 :)
This may not happen, because Fortran 95 has deleted a few
features from Fortran 77.
--
Steve
http://troutmask.apl.washington.edu/~kargl/
More information about the Gcc
mailing list