This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: system_
- To: Joe Griffin <joe dot griffin at mscsoftware dot com>
- Subject: Re: system_
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Date: Thu, 14 Jun 2001 20:55:32 +0200
- CC: gcc-bugs at gcc dot gnu dot org, jjg at tycho dot scm dot na dot mscsoftware dot com
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <3B27AEBE.3FFBDD5A@mscsoftware.com>
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)