This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: g77 bug (SAVE "skiped")
- To: "Jacek M. Holeczek" <holeczek at us dot edu dot pl>
- Subject: Re: g77 bug (SAVE "skiped")
- From: Mumit Khan <khan at NanoTech dot Wisc dot EDU>
- Date: Mon, 20 Mar 2000 10:31:32 -0600 (CST)
- cc: Toon Moene <toon at moene dot indiv dot nluug dot nl>, egcs-bugs at egcs dot cygnus dot com
- Reply-To: Mumit Khan <khan at NanoTech dot Wisc dot EDU>
On Mon, 20 Mar 2000, Jacek M. Holeczek wrote:
> > Do you have a (preferrably small) source example that shows what problem
> > you have ?
> I am just porting some king of a fortran package to Linux.
> Analysis of a core dump has led me to the conclusion that the "SAVE" is
> not taken into account. The piece of code was :
> ---------------------------------------------------------
> SUBROUTINE SELJ1(XTIL)
> C--------------------------------------------------------
> C SUBNAME= SELJ1 B.COLBORN
> C--------------------------------------------------------
> SAVE
> REAL*8 RNDM
> DIMENSION A(19),SUMA(19),X(19)
> DATA IFIRST /0/
> IF (IFIRST .EQ. 12345) GO TO 100
> C INITIATION PATH
> IFIRST = 12345
> ISIZE = 19
> X(1) = 0.
> DELTAX= .2
> ...
> C SELECT IPRIM
> 100 R = RNDM()
I ran your testcase on a variety of systems, including Linux (Red Hat
6.1), and get the expected result. You'll need to supply a bit more
info.
I simply called SELJ1 twice from a trivial program, and I get the
following, and looks exactly as I would expect.
ifirst = 12345
isize = 19
deltax = 0.200000003
ifirst = 12345
isize = 19
deltax = 0.200000003
Would you please try out a simple program and see if that is indeed
where the problem is?
While you're at it, please provide version and platform information.
`g77 -v' provides the version, and I assume you know what flavor of
Linux you're running on. If it's Suse distribution of Linux, all bets
are off, since they don't seem to understand how g77 works.
Regards,
Mumit