[Bug bootstrap/28326] New: [4.1/ICE] gcc-4.1.0 won't compile on power3
If I try to bootstrap on ppc64 and try to use BOOT_CFLAGS="-m64 -O2 -pipe -mtune=power3 -mcpu=power3" I get an ICE. If I leave out "-mtune=power3 -mcpu=power3" the bootstrap finishes. So one of the optimizations is causing this. here are the steps I followed some while ago. see http://bugs.gentoo.org/show_bug.cgi?id=126960 (gcc 4.1.1 has the same result) $ mkdir gcc-4.1.0-temp $ cd gcc-4.1.0-temp/ $ tar xfj /usr/portage/distfiles/gcc-4.1.0.tar.bz2 $ mkdir build $ cd build/ $ ../gcc-4.1.0/configure --prefix=/usr --bindir=/usr/powerpc64-unknown-linux-gnu/gcc-bin/4.1.0 --includedir=/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.1.0/include --datadir=/usr/share/gcc-data/powerpc64-unknown-linux-gnu/4.1.0 --mandir=/usr/share/gcc-data/powerpc64-unknown-linux-gnu/4.1.0/man --infodir=/usr/share/gcc-data/powerpc64-unknown-linux-gnu/4.1.0/info --with-gxx-include-dir=/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.1.0/include/g++-v4 --host=powerpc64-unknown-linux-gnu --build=powerpc64-unknown-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --disable-libmudflap --disable-libssp --disable-libgcj --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu [...] $ make LDFLAGS="" STAGE1_CFLAGS="-O" LIBPATH="/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.1.0" BOOT_CFLAGS="-m64 -O2 -pipe -mtune=power3 -mcpu=power3" profiledbootstrap [...] make[4]: Entering directory `/root/gcc-4.1.0-temp/build/gcc' make[4]: `crtend.o' is up to date. make[4]: `crtbeginS.o' is up to date. make[4]: `crtendS.o' is up to date. make[4]: `crtbeginT.o' is up to date. make[4]: `ecrti.o' is up to date. make[4]: `ecrtn.o' is up to date. make[4]: `ncrti.o' is up to date. make[4]: `ncrtn.o' is up to date. make[4]: `crtsavres.o' is up to date. make[4]: Leaving directory `/root/gcc-4.1.0-temp/build/gcc' ./xgcc -B./ -B/usr/powerpc64-unknown-linux-gnu/bin/ -isystem /usr/powerpc64-unknown-linux-gnu/include -isystem /usr/powerpc64-unknown-linux-gnu/sys-include -L/root/gcc-4.1.0-temp/build/gcc/../ld -O2 -O2 -O2 -pipe -mtune=power3 -mcpu=power3 -DIN_GCC-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -specs=ldblspecs -mno-minimal-toc -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../gcc-4.1.0/gcc -I../../gcc-4.1.0/gcc/. -I../../gcc-4.1.0/gcc/../include -I../../gcc-4.1.0/gcc/../libcpp/include -fPIC -mstrict-align -DL_muldi3 -c ../../gcc-4.1.0/gcc/libgcc2.c -o libgcc/./_muldi3.o {standard input}: Assembler messages: {standard input}:85: Warning: Unary operator - ignored because bad operand follows {standard input}:85: Warning: zero assumed for missing expression {standard input}:86: Error: Unrecognized opcode: `m' {standard input}:96: Error: Unrecognized opcode: `m' {standard input}:1199: Error: unassigned file number 2 make[3]: *** [libgcc/./_muldi3.o] Error 1 make[3]: Leaving directory `/root/gcc-4.1.0-temp/build/gcc' make[2]: *** [stmp-multilib] Error 2 make[2]: Leaving directory `/root/gcc-4.1.0-temp/build/gcc' make[1]: *** [stageprofile_build] Error 2 make[1]: Leaving directory `/root/gcc-4.1.0-temp/build/gcc' make: *** [profiledbootstrap] Error 2 -- Summary: [4.1/ICE] gcc-4.1.0 won't compile on power3 Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: major Priority: P3 Component: bootstrap AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: markus at unixforces dot net GCC build triplet: powerpc64-unknown-linux-gnu GCC host triplet: powerpc64-unknown-linux-gnu GCC target triplet: powerpc64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28326
[Bug bootstrap/28326] [4.1/ICE] gcc-4.1.0 won't compile on power3
--- Comment #2 from markus at unixforces dot net 2006-07-10 17:41 --- I tried this: $ make LDFLAGS="" LIBPATH="/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.1.1" BOOT_CFLAGS="-m64 -O2 -pipe -mtune=power3 -mcpu=power3" profiledbootstrap [...] make[4]: Entering directory `/root/gcc-4.1.1-temp/build/gcc' make[4]: `crtend.o' is up to date. make[4]: `crtbeginS.o' is up to date. make[4]: `crtendS.o' is up to date. make[4]: `crtbeginT.o' is up to date. make[4]: `ecrti.o' is up to date. make[4]: `ecrtn.o' is up to date. make[4]: `ncrti.o' is up to date. make[4]: `ncrtn.o' is up to date. make[4]: `crtsavres.o' is up to date. make[4]: Leaving directory `/root/gcc-4.1.1-temp/build/gcc' ./xgcc -B./ -B/usr/powerpc64-unknown-linux-gnu/bin/ -isystem /usr/powerpc64-unknown-linux-gnu/include -isystem /usr/powerpc64-unknown-linux-gnu/sys-include -L/root/gcc-4.1.1-temp/build/gcc/../ld -O2 -O2 -g -O2 -DIN_GCC-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -specs=ldblspecs -mno-minimal-toc -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../gcc-4.1.1/gcc -I../../gcc-4.1.1/gcc/. -I../../gcc-4.1.1/gcc/../include -I../../gcc-4.1.1/gcc/../libcpp/include -fPIC -mstrict-align -DL_muldi3 -c ../../gcc-4.1.1/gcc/libgcc2.c -o libgcc/./_muldi3.o /tmp/ccCAOUnw.s: Assembler messages: /tmp/ccCAOUnw.s:71: Warning: Unary operator - ignored because bad operand follows /tmp/ccCAOUnw.s:71: Warning: zero assumed for missing expression /tmp/ccCAOUnw.s:72: Error: Unrecognized opcode: `f' /tmp/ccCAOUnw.s:76: Error: Unrecognized opcode: `f' /tmp/ccCAOUnw.s:1160: Error: unassigned file number 2 make[3]: *** [libgcc/./_muldi3.o] Error 1 make[3]: Leaving directory `/root/gcc-4.1.1-temp/build/gcc' make[2]: *** [stmp-multilib] Error 2 make[2]: Leaving directory `/root/gcc-4.1.1-temp/build/gcc' make[1]: *** [stageprofile_build] Error 2 make[1]: Leaving directory `/root/gcc-4.1.1-temp/build/gcc' make: *** [profiledbootstrap] Error 2 and this: $ make LDFLAGS="" LIBPATH="/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.1.1" BOOT_CFLAGS="-m64 -O2 -pipe -mtune=power3 -mcpu=power3" bootstrap last command builds fine. this is a regression then? gcc-3.4 used to build fine using profiledbootstrap. I have not tried gcc 4.0 IIRC. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28326
[Bug bootstrap/28326] [4.1 regression] profiledbootstrap will produce an ICE with "-mtune=power3 -mcpu=power3" in BOOT_CFLAGS
--- Comment #3 from markus at unixforces dot net 2006-07-11 20:17 --- I did some testing and this are the results: gcc versions 3.4.6, 4.0.3 and 4.2-20060708 do all _not_ fail with profiledbootstrap and "-mtune=power3 -mcpu=power3" in BOOT_CFLAGS. which information do you need to get this fixed? -- markus at unixforces dot net changed: What|Removed |Added Known to fail||4.1.1 Known to work||3.4.6 4.0.3 Summary|[4.1/ICE] gcc-4.1.0 won't |[4.1 regression] |compile on power3 |profiledbootstrap will ||produce an ICE with "- ||mtune=power3 -mcpu=power3" ||in BOOT_CFLAGS http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28326
[Bug bootstrap/28326] [4.1 regression] profiledbootstrap will produce an ICE with "-mtune=power3 -mcpu=power3" in BOOT_CFLAGS
--- Comment #4 from markus at unixforces dot net 2006-09-06 13:02 --- any news about this? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28326
[Bug bootstrap/28326] [4.1 regression] profiledbootstrap will produce an ICE with "-mtune=power3 -mcpu=power3" in BOOT_CFLAGS
--- Comment #8 from markus at unixforces dot net 2008-02-13 13:06 --- (In reply to comment #7) > However, gcc-4.1 is a bit old now... I'm marking this bug as WONTFIX then. -- markus at unixforces dot net changed: What|Removed |Added Status|NEW |RESOLVED Resolution||WONTFIX http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28326
[Bug c/23158] New: building libstdc++.so.5 fails on ppc64 with gcc4 and gcc4.1
3-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c:62: /usr/include/bits/stdio.h: In function `vprintf': /usr/include/bits/stdio.h:36: error: syntax error before "__restrict__" /usr/include/bits/stdio.h: In function `getchar': /usr/include/bits/stdio.h:43: error: syntax error before "__restrict__" /usr/include/bits/stdio.h:59: confused by earlier errors, bailing out make[1]: *** [crtbeginS.o] Error 1 make[1]: *** Waiting for unfinished jobs make[1]: *** [crtbeginT.o] Error 1 In file included from /usr/include/stdio.h:828, from /var/tmp/portage/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/tsystem.h:72, from /var/tmp/portage/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c:62: /usr/include/bits/stdio.h: In function `vprintf': /usr/include/bits/stdio.h:36: error: syntax error before "__restrict__" /usr/include/bits/stdio.h: In function `getchar': /usr/include/bits/stdio.h:43: error: syntax error before "__restrict__" /usr/include/bits/stdio.h:59: confused by earlier errors, bailing out In file included from /usr/include/stdio.h:828, from /var/tmp/portage/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/tsystem.h:72, from /var/tmp/portage/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c:62: /usr/include/bits/stdio.h: In function `vprintf': /usr/include/bits/stdio.h:36: error: syntax error before "__restrict__" /usr/include/bits/stdio.h: In function `getchar': /usr/include/bits/stdio.h:43: error: syntax error before "__restrict__" /usr/include/bits/stdio.h:59: confused by earlier errors, bailing out make[1]: *** [crtbegin.o] Error 1 In file included from /usr/include/stdio.h:828, from /var/tmp/portage/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/tsystem.h:72, from /var/tmp/portage/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c:62: /usr/include/bits/stdio.h: In function `vprintf': /usr/include/bits/stdio.h:36: error: syntax error before "__restrict__" /usr/include/bits/stdio.h: In function `getchar': /usr/include/bits/stdio.h:43: error: syntax error before "__restrict__" /usr/include/bits/stdio.h:59: confused by earlier errors, bailing out make: *** [all-gcc] Error 2 !!! ERROR: sys-libs/libstdc++-v3-3.3.6 failed. !!! Function src_compile, Line 232, Exitcode 2 !!! (no error message) !!! If you need support, post the topmost build error, NOT this status message. I'm no expert, but the error is triggert by a file, that is installed by glibc (/usr/include/bits/stdio.h) and using exactly the same versions of glibc/gcc/libstdc++ works on i686-pc-linux-gnu, so I assume this is a problem in gcc. Regards, Markus -- Summary: building libstdc++.so.5 fails on ppc64 with gcc4 and gcc4.1 Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: markus at unixforces dot net CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: powerpc64-unknown-linux-gnu GCC host triplet: powerpc64-unknown-linux-gnu GCC target triplet: powerpc64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23158
[Bug bootstrap/23158] building GCC 3.3.6 fails on ppc64 with gcc4 and gcc4.1
--- Additional Comments From markus at unixforces dot net 2005-07-31 17:11 --- I re-ran the compile with -j1 ( instead of -j9 ;-) ) to get the command which was executed before the error. Then I re-ran this command with the -E option, so that the preprocessed source gets written to the file specified by the -o option, right? But all I get is an ICE and the file specified by -o does not get written -- and yes, I am at the right dirctory (hopefully, but find does not find that file, too): gcc # /var/tmp/portage/libstdc++-v3-3.3.6/work/build/gcc/xgcc -B/var/tmp/portage/libstdc++-v3-3.3.6/work/build/gcc/ -B/usr/powerpc64-unknown-linux-gnu/bin/ -B/usr/powerpc64-unknown-linux-gnu/lib/ -isystem /usr/powerpc64-unknown-linux-gnu/include -O2 -DIN_GCC-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -I. -I. -I/var/tmp/portage/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc -I/var/tmp/portage/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/. -I/var/tmp/portage/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/config -I/var/tmp/portage/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/../include -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -c /var/tmp/portage/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c -DCRT_BEGIN -o crtbegin.o -E cc1: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html> for instructions. gcc # ls crtbegin.o ls: crtbegin.o: No such file or directory gcc # -- What|Removed |Added Version|3.3.6 |4.1.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23158
[Bug bootstrap/23158] building GCC 3.3.6 fails on ppc64 with gcc4 and gcc4.1
--- Additional Comments From markus at unixforces dot net 2005-07-31 17:40 --- ok. thx for the info. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23158
[Bug bootstrap/23158] building GCC 3.3.6 fails on ppc64 with gcc4 and gcc4.1
--- Additional Comments From markus at unixforces dot net 2005-07-31 18:55 --- I have now tried to bulid outside of portage. Or that is to say: a normal bulid. Here is what I did (this is basicly what emerge does): $ cd ~ $ mkdir libstc++-v3-temp2 $ cd libstc++-v3-temp2 $ tar xfj /usr/portage/distfiles/gcc-3.3.6.tar.bz2 $ mkdir build $ cd build $ ../gcc-3.3.6/configure --prefix=/usr --bindir=/usr/powerpc64-unknown-linux-gnu/gcc-bin/4.1.0-beta20050730/ --includedir=/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.1.0-beta20050730/include/ --datadir=/usr/share/gcc-data/powerpc64-unknown-linux-gnu/4.1.0-beta20050730/ --mandir=/usr/share/gcc-data/powerpc64-unknown-linux-gnu/4.1.0-beta20050730/man/ --infodir=/usr/share/gcc-data/powerpc64-unknown-linux-gnu/4.1.0-beta20050730/info/ --enable-shared --host=powerpc64-unknown-linux-gnu --target=powerpc64-unknown-linux-gnu --with-system-zlib --enable-languages=c++ --enable-threads=posix --enable-long-long --disable-checking --enable-cstdio=stdio --enable-__cxa_atexit --enable-version-specific-runtime-libs --with-gxx-include-dir=/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.1.0-beta20050730/include/g++-v4/ --with-local-prefix=/usr/local/ --disable-multilib --enable-nls --without-included-gettext $ touch ../gcc-3.3.6/gcc/c-gperf.h (don't know why this done by the way..) $ make all-target-libstdc++-v3 LIBPATH="/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.1.0-beta20050730/" BOOT_CFLAGS=" -O2 -pipe" STAGE1_CFLAGS="-O" And the I get exactly the same error as before: [...] /root/libstc++-v3-temp2/build/gcc/xgcc -B/root/libstc++-v3-temp2/build/gcc/ -B/usr/powerpc64-unknown-linux-gnu/bin/ -B/usr/powerpc64-unknown-linux-gnu/lib/ -isystem /usr/powerpc64-unknown-linux-gnu/include -O2 -DIN_GCC-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -I. -I. -I../../gcc-3.3.6/gcc -I../../gcc-3.3.6/gcc/. -I../../gcc-3.3.6/gcc/config -I../../gcc-3.3.6/gcc/../include -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss \ -c ../../gcc-3.3.6/gcc/crtstuff.c -DCRT_BEGIN \ -o crtbegin.o In file included from /usr/include/stdio.h:828, from ../../gcc-3.3.6/gcc/tsystem.h:72, from ../../gcc-3.3.6/gcc/crtstuff.c:62: /usr/include/bits/stdio.h: In function `vprintf': /usr/include/bits/stdio.h:36: error: syntax error before "__restrict__" /usr/include/bits/stdio.h: In function `getchar': /usr/include/bits/stdio.h:43: error: syntax error before "__restrict__" /usr/include/bits/stdio.h:59: confused by earlier errors, bailing out make[1]: *** [crtbegin.o] Error 1 make[1]: Leaving directory `/root/libstc++-v3-temp2/build/gcc' make: *** [all-gcc] Error 2 -- What|Removed |Added Status|RESOLVED|UNCONFIRMED Resolution|INVALID | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23158
[Bug bootstrap/23158] building GCC 3.3.6 fails on ppc64 with gcc4 and gcc4.1
--- Additional Comments From markus at unixforces dot net 2005-07-31 18:56 --- Created an attachment (id=9400) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9400&action=view) preprocessed sourced outside of emerge -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23158
[Bug bootstrap/23158] building GCC 3.3.6 fails on ppc64 with gcc4 and gcc4.1
--- Additional Comments From markus at unixforces dot net 2005-07-31 19:11 --- sorry to bug you again, but I ran make like this and got exactly the same problem :-( make clean && make all-target-libstdc++-v3 LIBPATH="/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.1.0-beta20050730/" BOOT_CFLAGS=" -O2 -pipe" -- What|Removed |Added Status|RESOLVED|UNCONFIRMED Resolution|INVALID | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23158
[Bug bootstrap/28326] [4.1 regression] profiledbootstrap will produce an ICE with "-mtune=power3 -mcpu=power3" in BOOT_CFLAGS
--- Comment #6 from markus at unixforces dot net 2008-01-13 19:13 --- still failing with the 4.1-20080107 snapshot -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28326