Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!usc!bloom-beacon!bu-cs!encore!xenna.UUCP From: mccall@xenna.UUCP (Dan McCall,,2653,) Newsgroups: gnu.gcc.bug Subject: Possible optimization but in gcc-1.34 and 1.35 Message-ID: <8511@xenna.Encore.COM> Date: 15 Jun 89 21:21:05 GMT Sender: news@Encore.COM Distribution: gnu Lines: 75 The following simple program produces incorrect code on the Encore Multimax. Both 1.34 and 1.35 produce the same results. See below, the file that says 'using -S -O' has the assembler line: 'movd $4227976,_fixed.0' This "constant 4227976" looks like an internal pointer that somehow made it into the instruction stream. When I built both versions of gcc (1.34 and 1.35) I was not able to get the stage1 and stage2 .o files to compare without differences (using the sh script which tries ignores differences due to COFF). Has anyone had other results on the Multimax? Has anyone had success with 1.35 or 1.34 on the Multimax? If so, can you 1) try the program below and 2) provide any details of how you built gcc that vary from the instructions in the INSTALL file? Thanks, Dan McCall ---------------------------------------------------------------------------- source program bug1.c ---------------------------------------------------------------------------- float fixed; main() { fixed = 0.0; } ----------------------------------------------------------------------------- using -S ----------------------------------------------------------------------------- .file "bug1.c" gcc_compiled.: .text .align 4 .LC0: .float 0f0.00000000000000000000e+00 .align 16 .globl _main _main: enter [],0 movd .LC0,_fixed .L1: exit [] ret 0 .comm _fixed,4 ----------------------------------------------------------------------------- using -S -O ----------------------------------------------------------------------------- .file "bug1.c" gcc_compiled.: .text .align 16 .globl _main _main: enter [],0 movd $4227976,_fixed exit [] ret 0 .comm _fixed,4 ----------------------------------------------------------------------------- standard error output using -v ----------------------------------------------------------------------------- gcc version 1.34 /usr/local/lib/gcc-cpp -v -undef -D__GNUC__ -Dns32000 -Dn16 -Dns16000 -Dns32332 -Dunix -D__ns32000__ -D__n16__ -D__ns16000__ -D__ns32332__ -D__unix__ -D__OPTIMIZE__ bug1.c /tmp/cc020408.cpp GNU CPP version 1.34 /usr/local/lib/gcc-cc1 /tmp/cc020408.cpp -quiet -dumpbase bug1.c -O -version -o bug1.s GNU C version 1.34 (32000, Encore syntax) compiled by GNU C version 1.34.