From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.redhat.com (mail.redhat.com [199.183.24.239]) by listman.redhat.com (Postfix) with ESMTP id 4C8222F2EB for ; Tue, 17 Apr 2001 19:54:13 -0400 (EDT) Received: (from mail@localhost) by mail.redhat.com (8.11.0/8.8.7) id f3HNon919234 for axp-list@listman.redhat.com; Tue, 17 Apr 2001 19:50:49 -0400 Received: from smtp10ve.mailsrvcs.net ([206.46.170.142]) by mail.redhat.com (8.11.0/8.8.7) with ESMTP id f3HNonC19230 for ; Tue, 17 Apr 2001 19:50:49 -0400 Received: from voicenet.com (adsl-141-155-118-40.nyc.adsl.bellatlantic.net [141.155.118.40]) by smtp10ve.mailsrvcs.net (8.9.1/8.9.1) with ESMTP id MAA27985; Tue, 17 Apr 2001 12:49:55 -0500 (CDT) Message-ID: <3ADCF1E0.66BCA4AB@voicenet.com> Date: Tue, 17 Apr 2001 21:46:08 -0400 From: Uncle George X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.17-4 alpha) X-Accept-Language: en MIME-Version: 1.0 To: gcc-bugs@gcc.gnu.org, axp-list@redhat.com Subject: gcc 2.96 optimization bug on RedHat7.0/alpha Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0.1 Precedence: bulk Reply-To: axp-list@redhat.com List-Help: List-Post: List-Subscribe: , List-Id: Linux and Red Hat on Alpha processors List-Unsubscribe: , List-Archive: 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]$