system_
Toon Moene
toon@moene.indiv.nluug.nl
Thu Jun 14 12:56:00 GMT 2001
Joe Griffin wrote:
> I am not sure if this is a bug or not. The
> following program crashes with g77:
>
> <20> cat aa.f
> parameter (n=50)
> common /system/ i(n)
> do 10 j=1, n
> i(j) = j
> 10 continue
> end
>
> <21> g77 -fno-globals aa.f
> /usr/bin/ld: Warning: size of symbol `system_' changed from 200 to 26 in
> Lsystem.o
> /usr/bin/ld: Warning: type of symbol `system_' changed from 1 to 2 in
> Lsystem.o
> <22> a.out
> Segmentation fault
> common/system/ gets defined at compile time as "system_":
>
> <24> nm aa.o
> 00000000 T MAIN__
> 00000000 t gcc2_compiled.
> U s_stop
> 000000c8 C system_
Bweh ! I'm glad I didn't think this up.
You can get *this example* to compile as follows:
g77 -fno-underscoring griffin.f
However, this only works because the example code has no external
symbols (other than the COMMON block).
Hope this helps,
[ I'll see what I can do (i.e. make this a test case in our 3.1 version)
-
however, I do not know of a solution yet ]
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)
More information about the Gcc-bugs
mailing list