The following g77 program prints 2.0 where it should have printed 3.14159 What follows is (a) the program (b) what happened when I compiled it (c) what happened when I ran it (d) a printout of its .s file mahoe{~/Jfh} % cat testparm2.f REAL PI COMPLEX Z,I PARAMETER(PI = 3.14159, I = (0.0,1.0), Z = PI*I ) PRINT*,'Pi*i should be (0.0,3.14159) but is ', Z END mahoe{~/Jfh} % g77 -save-temps -v testparm2.f g77 version 2.95.3 20010315 (release) (from FSF-g77 version 0.5.25 20010315 (release)) Driving: g77 -save-temps -v testparm2.f -lg2c -lm Reading specs from /usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.3/specs gcc version 2.95.3 20010315 (release) /usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.3/f771 testparm2.f -quiet -dumpbase testparm2.f -version -fversion -o testparm2.s GNU F77 version 2.95.3 20010315 (release) (alphaev6-dec-osf4.0f) compiled by GNU C version 2.7.2.3.f.1. GNU Fortran Front End version 0.5.25 20010315 (release) as -g -nocpp -O0 -o testparm2.o testparm2.s /usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.3/mips-tfile -v -I testparm2.o~ -o testparm2.o testparm2.s mips-tfile version 2.95.3 20010315 (release) /usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.3/collect2 -G 8 -O1 -call_shared /usr/lib/cmplrs/cc/crt0.o -L/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.3 -L/usr/lib/cmplrs/cc -L/usr/local/lib testparm2.o -lg2c -lm -lgcc -lc -lgcc mahoe{~/Jfh} % ./a.out Pi*i should be (0.0,3.14159) but is (0.,2.) mahoe{~/Jfh} % cat testparm2.s .verstamp 3 11 .set noreorder .set volatile .set noat .arch ev6 .file 1 "testparm2.f" .data .align 3 __g77_cilist_0.0: .long 0 .long 6 .long 0 .space 4 .quad 0 .long 0 .space 4 .rdata .quad 0 $LC2: .ascii "Pi*i should be (0.0,3.14159) but is " .align 2 $LC4: .long 0x0 .long 0x40000000 $LC5: .align 2 $LC0: .long 9 .align 2 $LC1: .long 1 .align 2 $LC3: .long 6 .text .align 5 .globl MAIN__ .ent MAIN__ MAIN__: .frame $15,16,$26,0 .mask 0x4008000,-16 ldgp $29,0($27) $MAIN__..ng: lda $30,-16($30) stq $26,0($30) stq $15,8($30) mov $30,$15 .prologue 1 lda $16,__g77_cilist_0.0 jsr $26,s_wsle ldgp $29,0($26) lda $16,$LC0 lda $17,$LC1 lda $18,$LC2 lda $19,36 jsr $26,do_lio ldgp $29,0($26) lda $16,$LC3 lda $17,$LC1 lda $18,$LC4 lda $19,8 jsr $26,do_lio ldgp $29,0($26) jsr $26,e_wsle ldgp $29,0($26) lda $16,$LC5 mov $31,$17 jsr $26,s_stop ldgp $29,0($26) $L2: mov $15,$30 ldq $26,0($30) ldq $15,8($30) lda $30,16($30) ret $31,($26),1 .end MAIN__
I cannot reproduce this on Alpha Linux with 2.95's Fortran 0.5.25 20010319 (prerelease). Also, 2.95 is very old and no longer supported. Could you please try whether this still occurs with a current compiler like 3.3? Falk
Subject: Re: Bad arithmetic in complex parameter Dear Falk Thank you. As I am not in charge of keeping software up to date on our machines I am sending a copy of this e-mail to those who are. Dear Bugs & ITS-Help Yesterday I complained to the g77 people about a bug I had found in g77 on mahoe (but not on MCS machines like ihi). They say that g77 is now running version 3.3 and ours (2.95 in both ITS and MCS) is very old. Any chance of an update? It costs us nothing. See http://www.gnu.org/software/fortran/fortran.html The Fortran program that gave the bad output (0.,2.) on mahoe is REAL PI COMPLEX Z,I PARAMETER(PI = 3.14159, I = (0.0,1.0), Z = PI*I ) PRINT*,'Pi*i should be near (0.0,3.14159) but is ', Z END On Tue, 9 Jun 2003, falk@debian.org wrote: > Date: 9 Jun 2003 12:35:49 -0000 > From: "falk@debian.org" <gcc-bugzilla@gcc.gnu.org> > To: john.harper@vuw.ac.nz > Subject: [Bug fortran/11127] Bad arithmetic in complex parameter > > PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11127 > > > falk@debian.org changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > Status|UNCONFIRMED |WAITING > > > ------- Additional Comments From falk@debian.org 2003-06-09 12:35 ------- > I cannot reproduce this on Alpha Linux with 2.95's Fortran 0.5.25 > 20010319 (prerelease). Also, 2.95 is very old and no longer supported. > Could you please try whether this still occurs with a current compiler > like 3.3? > > Falk > > > > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. > John Harper, School of Mathematical and Computing Sciences, Victoria University, PO Box 600, Wellington, New Zealand e-mail john.harper@vuw.ac.nz phone (+64)(4)463 5341 fax (+64)(4)463 5045
Subject: Re: Bad arithmetic in complex parameter Hi Thank you. However printenv on the machine on which I had g77 trouble said HOSTTYPE=alpha OSTYPE=osf1 MACHTYPE=alpha so I think it was running under OSF not Linux. I have not yet heard back from our systems people about updating their g77. On Tue, 9 Jun 2003, falk@debian.org wrote: > Date: 9 Jun 2003 12:35:49 -0000 > From: "falk@debian.org" <gcc-bugzilla@gcc.gnu.org> > To: john.harper@vuw.ac.nz > Subject: [Bug fortran/11127] Bad arithmetic in complex parameter > > PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11127 > > > falk@debian.org changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > Status|UNCONFIRMED |WAITING > > > ------- Additional Comments From falk@debian.org 2003-06-09 12:35 ------- > I cannot reproduce this on Alpha Linux with 2.95's Fortran 0.5.25 > 20010319 (prerelease). Also, 2.95 is very old and no longer supported. > Could you please try whether this still occurs with a current compiler > like 3.3? > > Falk > > > > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. > John Harper, School of Mathematical and Computing Sciences, Victoria University, PO Box 600, Wellington, New Zealand e-mail john.harper@vuw.ac.nz phone (+64)(4)463 5341 fax (+64)(4)463 5045
Subject: Re: Bad arithmetic in complex parameter Hi I did indeed report that bug but I do not understand your reply. Could you please explain? I do not know what "target milestone" means. On Sun, 28 Jun 2003, pinskia at physics dot uc dot edu wrote: > Date: 28 Jun 2003 18:26:28 -0000 > From: pinskia at physics dot uc dot edu <gcc-bugzilla@gcc.gnu.org> > To: john.harper@vuw.ac.nz > Subject: [Bug fortran/11127] Bad arithmetic in complex parameter > > PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11127 > > > pinskia at physics dot uc dot edu changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > Target Milestone|3.4 |--- > > > > > > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. > John Harper, School of Mathematical and Computing Sciences, Victoria University, PO Box 600, Wellington, New Zealand e-mail john.harper@vuw.ac.nz phone (+64)(4)463 5341 fax (+64)(4)463 5045
John, never mind about Andrew Pinski's mail. The target milestone is the version for which we intend to fix the bug. It used to be gcc3.4 and he removed that, leaving it open when the bug will be fixed. We usually only assign milestones for bugs that denote regressions, i.e. things that used to work and don't any more. Wolfgang
No feedback in 3 months and Falk could not reproduce this so closing.