Fortran question
H. J. Lu
hjl@lucon.org
Tue Aug 3 06:24:00 GMT 2004
On Tue, Aug 03, 2004 at 08:04:14AM +0200, Lassi A. Tuura wrote:
> >With IMA, I've discovered that one of the Fortran SPEC benchmarks
> >(fma3d)
> >has a named common block that is different sizes in different source
> >files, in
> >violation of both the f77 and f90 standards. However, the fact that
> >this program
> >normally works, presumably in a lot of different environments, when it
> >would
> >be easy to detect the error at linktime, suggests that maybe it is
> >used a fair
> >amount in existing code, and maybe it would be a good idea for the
> >compiler
> >to accept it. What do the Fortran experts think? Thanks.
>
> I'm not a FORTRAN programmer, but I can tell what the millions of lines
> we have here expect :-) The linker should pick the largest size for the
> common.
>
Not only that, linker should also pick the largest alignment:
http://sources.redhat.com/ml/binutils/2003-04/msg00273.html
H.J.
More information about the Gcc
mailing list