gcc 2.96 optimization bug on RedHat7.0/alpha
Christopher C. Chimelis
chris@debian.org
Tue Apr 17 17:05:00 GMT 2001
On Tue, 17 Apr 2001, Uncle George wrote:
> with -O2 i get the wrong answer
>
> [gat@LX gat]$ gcc -g -O2 a.c -o a
> [gat@LX gat]$ ./a
> FlooR: x = 22.16, i0=1, i1=536871996
>
>
> with -O i get a passable answer
>
> [gat@LX gat]$ gcc -g -O a.c -o a
> [gat@LX gat]$ ./a
> FlooR: x = 22.16, i0=1077291253, i1=-1030792151
>
>
> BTW what exactly is the page one uses to submit/fill in the bug report
> for gcc et al ?
This has not been fixed in upstream gcc CVS, FYI. Using your source
and the gcc 3.0 snapshot from :
chris@spawn:
~/test > gcc-3.0 -g -O2 -o uncleg uncleg.c
chris@spawn:
~/test > ./uncleg
FlooR: x = 22.16, i0=1, i1=536872108
chris@spawn:
~/test > gcc-3.0 -g -O -o uncleg uncleg.c
chris@spawn:
~/test > ./uncleg
FlooR: x = 22.16, i0=1077291253, i1=-1030792151
My local copy of a patched 2.95.4pre returns the correct results, though,
so something broke between 2.95.x and 3.0pre.
Figured that you'd want to know :-)
C
More information about the Gcc-bugs
mailing list