From: Uncle George <gatgul@voicenet.com>
To: gcc-bugs@gcc.gnu.org, axp-list@redhat.com
Subject: gcc 2.96 optimization bug on RedHat7.0/alpha
Date: Tue, 17 Apr 2001 21:46:08 -0400 [thread overview]
Message-ID: <3ADCF1E0.66BCA4AB@voicenet.com> (raw)
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 ?
pgm is :
[gat@LX gat]$ cat a.c
double floor ( double );
main()
{
double d = 22.16;
floor( d );
}
double
floor( double x )
{
int i0,i1;
i0 = *((int*)&x+1);
i1 = *(int*)&x;
printf("FlooR: x = %g, i0=%d, i1=%d\n",x, i0, i1);
return x;
}
-----------------------------------------------------------
[gat@LX gat]$ gcc -v -save-temps -g -O2 a.c -o a
Reading specs from /usr/lib/gcc-lib/alpha-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.0)
/usr/lib/gcc-lib/alpha-redhat-linux/2.96/cpp0 -lang-c -v -D__GNUC__=2
-D__GNUC_MINOR__=96 -D__GNUC_PATCHLEVEL__=0 -Dlinux -Dunix -D_LONGLONG
-D__alpha__ -D__ELF__ -D__linux__ -D__unix__ -D_LONGLONG -D__alpha__
-D__ELF__ -D__linux -D__unix -Asystem(linux) -D__OPTIMIZE__ -g
-D__LANGUAGE_C__ -D__LANGUAGE_C -DLANGUAGE_C -Acpu(alpha)
-Amachine(alpha) -D__alpha -D__alpha__ -D__alpha_ev4__ -Acpu(ev4) a.c
a.i
GNU CPP version 2.96 20000731 (Red Hat Linux 7.0) (cpplib)
(Alpha GNU/Linux for ELF)
ignoring nonexistent directory "/usr/alpha-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/lib/gcc-lib/alpha-redhat-linux/2.96/include
/usr/include
End of search list.
/usr/lib/gcc-lib/alpha-redhat-linux/2.96/cc1 a.i -quiet -dumpbase a.c
-g -O2 -version -o a.s
GNU C version 2.96 20000731 (Red Hat Linux 7.0) (alpha-redhat-linux)
compiled by GNU C version 2.96 20000731 (Red Hat Linux 7.0).
as -o a.o a.s
/usr/lib/gcc-lib/alpha-redhat-linux/2.96/collect2 -m elf64alpha -O3
-dynamic-linker /lib/ld-linux.so.2 -o a
/usr/lib/gcc-lib/alpha-redhat-linux/2.96/../../../crt1.o
/usr/lib/gcc-lib/alpha-redhat-linux/2.96/../../../crti.o
/usr/lib/gcc-lib/alpha-redhat-linux/2.96/crtbegin.o
-L/usr/lib/gcc-lib/alpha-redhat-linux/2.96
-L/usr/lib/gcc-lib/alpha-redhat-linux/2.96/../../.. a.o -lgcc -lc -lgcc
/usr/lib/gcc-lib/alpha-redhat-linux/2.96/crtend.o
/usr/lib/gcc-lib/alpha-redhat-linux/2.96/../../../crtn.o
[gat@LX gat]$
next reply other threads:[~2001-04-17 23:54 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-18 1:46 Uncle George [this message]
2001-04-18 0:04 ` gcc 2.96 optimization bug on RedHat7.0/alpha Christopher C. Chimelis
2001-04-18 3:41 ` Matt Wilson
2001-04-18 4:32 ` Brad Lucier
2001-04-18 15:13 ` Uncle George
2001-04-18 13:40 ` Pawel Salek
2001-04-18 15:53 ` Uncle George
2001-04-18 14:03 ` David Woodhouse
2001-04-18 17:10 ` Uncle George
2001-04-18 15:40 ` Pawel Salek
2001-04-18 16:17 ` David Woodhouse
2001-04-18 16:46 ` Andrew A. Gill
2001-04-18 17:04 ` T. Daniel Crawford
2001-04-18 18:15 ` Nelson Brito
2001-04-18 18:38 ` jeff.sturm
2001-04-18 14:55 ` Michal Jaegermann
2001-04-18 22:18 ` Uncle George
2001-04-18 20:50 ` Chris Eleveld (Sector 7 Group)
2001-04-18 21:33 ` Michal Jaegermann
2001-04-18 23:09 ` P.TURLAIS
2001-04-19 0:28 ` Uncle George
2001-04-18 22:03 ` jeff.sturm
-- strict thread matches above, loose matches on Subject: below --
2001-04-18 16:22 Hoover, Tony
2001-04-18 16:55 ` David Woodhouse
2001-04-18 17:07 ` alvin
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox