Bug 13632 - [3.4/4.0 Regression] ICE while building crtbegin.o (STAGE1_CFLAGS=-O)
[3.4/4.0 Regression] ICE while building crtbegin.o (STAGE1_CFLAGS=-O)
Status: RESOLVED INVALID
Product: gcc
Classification: Unclassified
Component: rtl-optimization
3.4.0
: P1 critical
: 3.4.0
Assigned To: Not yet assigned to anyone
: build, ice-on-valid-code, wrong-code
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-01-09 13:12 UTC by lu_zero
Modified: 2004-09-13 14:15 UTC (History)
1 user (show)

See Also:
Host: powerpc-unknown-linux-gnu
Target: powerpc-unknown-linux-gnu
Build: powerpc-unknown-linux-gnu
Known to work: 3.3
Known to fail:
Last reconfirmed: 2004-01-13 04:50:11


Attachments
preprocessed sources by xgcc (107.32 KB, text/plain)
2004-01-10 18:32 UTC, lu_zero
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lu_zero 2004-01-09 13:12:16 UTC
base info: gcc-3.2.3, glibc-2.3.2-r9, 2.6.1_rc1-benh1
CFLAGS="-O2 -pipe -mcpu=7450 -mtune=7450 -maltivec -mabi=altivec"

In the latest 4 days I tried to build gcc-3.4 from cvs HEAD,
it segfaults reproducibly on crtbegin.o

make[2]: Entering directory `/var/tmp/portage/gcc-3.4/work/build/gcc'
make CC=" stage1/xgcc -Bstage1/ -B/usr/powerpc-unknown-linux-gnu/bin/"
CC_FOR_BUILD=" stage1/xgcc -Bstage1/ -B/usr/powerpc-unknown-linux-gnu/bin/" \
         STAGE_PREFIX=stage1/ \
         ADAFLAGS="" CFLAGS="-g -O2" LDFLAGS=""
WARN_CFLAGS="\$(GCC_WARN_CFLAGS)" STRICT_WARN="-pedantic -Wno-long-long
-Wold-style-definition -Werror" libdir=/usr/lib LANGUAGES="c gcov gcov-dump c++
f77 objc" MAKEINFO="makeinfo" MAKEINFOFLAGS="" MAKEOVERRIDES= OUTPUT_OPTION="-o
\$@" \
         CFLAGS="-g -O2" WERROR="-Werror"
make[3]: Entering directory `/var/tmp/portage/gcc-3.4/work/build/gcc'
if [ -f specs.ready ] ; then \
        true; \
else \
        echo timestamp > specs.ready; \
fi
./xgcc -B./ -B/usr/powerpc-unknown-linux-gnu/bin/ -isystem
/usr/powerpc-unknown-linux-gnu/include -isystem
/usr/powerpc-unknown-linux-gnu/sys-include
-L/var/tmp/portage/gcc-3.4/work/build/gcc/../ld -O2 -DIN_GCC    -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
 -isystem ./include  -I. -I. -I/var/tmp/portage/gcc-3.4/work/gcc/gcc
-I/var/tmp/portage/gcc-3.4/work/gcc/gcc/.
-I/var/tmp/portage/gcc-3.4/work/gcc/gcc/../include   -g0
-finhibit-size-directive -fno-inline-functions -fno-exceptions
-fno-zero-initialized-in-bss -fno-unit-at-a-time -msdata=none \
   -c /var/tmp/portage/gcc-3.4/work/gcc/gcc/crtstuff.c -DCRT_BEGIN \
  -o crtbegin.o
In file included from /usr/include/stdio.h:36,
                 from /var/tmp/portage/gcc-3.4/work/gcc/gcc/tsystem.h:79,
                 from /var/tmp/portage/gcc-3.4/work/gcc/gcc/crtstuff.c:62:
/usr/include/bits/types.h:146: internal compiler error: Segmentation fault
Comment 1 Andrew Pinski 2004-01-09 17:10:03 UTC
Can you provide the preprocessed source file?
Comment 2 lu_zero 2004-01-10 18:32:40 UTC
Created attachment 5448 [details]
preprocessed sources by xgcc
Comment 3 lu_zero 2004-01-10 18:34:51 UTC
I tried something on segher suggestion:

1) gcc-3.4 builds fine if I add --enable-checkings with both gcc-3.3.2 and gcc-3.2.3
2) I'm about to try to build w/out that option with gcc-3.3.2 and see if that
still applies or not.
Comment 4 lu_zero 2004-01-11 05:20:40 UTC
Same result but that time with gcc-3.3.2

./xgcc -B./ -B/usr/powerpc-unknown-linux-gnu/bin/ -isystem
/usr/powerpc-unknown-linux-gnu/include -isystem
/usr/powerpc-unknown-linux-gnu/sys-include
-L/var/tmp/portage/gcc-3.4/work/build/gcc/../ld -O2 -DIN_GCC    -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
 -isystem ./include  -I. -I. -I/var/tmp/portage/gcc-3.4/work/gcc/gcc
-I/var/tmp/portage/gcc-3.4/work/gcc/gcc/.
-I/var/tmp/portage/gcc-3.4/work/gcc/gcc/../include   -g0
-finhibit-size-directive -fno-inline-functions -fno-exceptions
-fno-zero-initialized-in-bss -fno-unit-at-a-time -msdata=none \
   -c /var/tmp/portage/gcc-3.4/work/gcc/gcc/crtstuff.c -DCRT_BEGIN \
  -o crtbegin.o
In file included from /usr/include/stdio.h:36,
                 from /var/tmp/portage/gcc-3.4/work/gcc/gcc/tsystem.h:79,
                 from /var/tmp/portage/gcc-3.4/work/gcc/gcc/crtstuff.c:62:
/usr/include/bits/types.h:146: internal compiler error: Segmentation fault
Comment 5 Andrew Pinski 2004-01-13 02:00:09 UTC
Some more information about this bug, it happens with STAGE1_CFLAGS="-0".
Comment 6 lu_zero 2004-01-13 04:36:18 UTC
tried and the result is the same
Comment 7 Andrew Pinski 2004-01-13 04:50:10 UTC
Changing to new at this point, I have another bug which I am going to file as bootstrap is 
broken with STAGE1_CFLAGS=-O at least also on powerpc-apple-darwin7.2.0.
Comment 8 Richard Henderson 2004-03-02 23:47:05 UTC
Unless you can show a bug with BOOT_CFLAGS=-O1, then this is a problem with the
bootstrap compiler being used and *not* with gcc-3.4.
Comment 9 Steven Bosscher 2004-03-21 18:01:10 UTC
Andrew Pinski and I cannot reproduce this, and rth is right of course -- this 
looks like a problem with the bootstrap compiler, not gcc 3.4.0.  So I'm 
closing this bug after discussing it with Andrew on IRC. 
Comment 10 Steven Bosscher 2004-03-21 18:01:26 UTC
this time close it :) 
Comment 11 Steven Bosscher 2004-03-21 18:01:42 UTC
this time close it :)