This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fortran question


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]