I downloaded the snapshot gcc-4.0-20040912.tar.bz2 and compiled it with: ../gcc40/configure --prefix=/usr/local/gcc40 --program-suffix=40 --with-cpu=G5 --enable-altivec --enable-languages=c,c++ --enable-checking=assert,misc,tree,gc,rtl,rtlflag,fold,gcac I get following ICE: /home/cie019/gcc40/obj/gcc/xgcc -B/home/cie019/gcc40/obj/gcc/ -B/usr/local/gcc40/powerpc-unknown-linux-gnu/bin/ -B/usr/local/gcc40/powerpc-unknown-linux-gnu/lib/ -isystem /usr/local/gcc40/powerpc-unknown-linux-gnu/include -isystem /usr/local/gcc40/powerpc-unknown-linux-gnu/sys-include -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -I. -I. -I../../gcc40/gcc -I../../gcc40/gcc/. -I../../gcc40/gcc/../include -I../../gcc40/gcc/../libcpp/include -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-unit-at-a-time -msdata=none \ -c ../../gcc40/gcc/crtstuff.c -DCRT_BEGIN \ -o crtbegin.o <built-in>:0: internal compiler error: tree check: expected record_type or union_type or qual_union_type, have integer_type in fold_checksum_tree, at fold-const.c:9181 Please submit a full bug report, with preprocessed source if appropriate. when I configure with: ../gcc40/configure --prefix=/usr/local/gcc40 --program-suffix=40 --with-cpu=G5 --enable-altivec --enable-languages=c,c++ --enable-checking compilation works fine. Michael Cieslinski
Confirmed through double reports: http://gcc.gnu.org/ml/gcc/2004-09/msg00712.html Drow posted a patch, even though not on gcc-patches@.
Subject: Re: ICE with --enable-checking=assert,misc,tree,gc,rtl,rtlflag,fold,gcac The patch is for a different problem unfortunately :-(
Oops, I can't read. Yes, I posted a patch for this.
And sorry, the patch *was* posted to gcc-patches: http://gcc.gnu.org/ml/gcc-patches/2004-09/msg01150.html BTW, i dunno if this regression also applies to 3.4 or 3.3.
Hmm, I thought I had fixed one like this before ...
Checked in.
I applied the patch, now I get: configure:4985: checking for exception model to use configure:5029: /home/cie019/gcc40/obj/gcc/xgcc -shared-libgcc - B/home/cie019/gcc40/obj/gcc/ -nostdinc++ -L/home/cie019/gcc40/obj/powerpc- unknown-linux-gnu/libstdc++-v3/src -L/home/cie019/gcc40/obj/powerpc-unknown- linux-gnu/libstdc++-v3/src/.libs -B/usr/local/gcc40/powerpc-unknown-linux- gnu/bin/ -B/usr/local/gcc40/powerpc-unknown-linux-gnu/lib/ - isystem /usr/local/gcc40/powerpc-unknown-linux-gnu/include - isystem /usr/local/gcc40/powerpc-unknown-linux-gnu/sys-include -c -S -O2 -g -O2 conftest.cc >&5 configure: In function `void foo()': configure:5022: internal compiler error: in cp_tree_size, at cp/cp-objcp- common.c:112 Please submit a full bug report, with preprocessed source if appropriate. in libstdc++-v3/config.log
With the patch http://gcc.gnu.org/ml/gcc-patches/2004-09/msg01150.html applied, I found that the configure option --enable-checking=fold causes the ICE compiling cp/cp-objcp-common.c /home/cie019/gcc40/obj/gcc/xgcc -shared-libgcc -B/home/cie019/gcc40/obj/gcc/ - nostdinc++ -L/home/cie019/gcc40/obj/powerpc-unknown-linux-gnu/libstdc++-v3/src - L/home/cie019/gcc40/obj/powerpc-unknown-linux-gnu/libstdc++-v3/src/.libs - B/usr/local/gcc40/powerpc-unknown-linux-gnu/bin/ -B/usr/local/gcc40/powerpc- unknown-linux-gnu/lib/ -isystem /usr/local/gcc40/powerpc-unknown-linux- gnu/include -isystem /usr/local/gcc40/powerpc-unknown-linux-gnu/sys-include -E conftest.cc conftest.cc: In constructor `Foo::Foo()': conftest.cc:4: internal compiler error: in cp_tree_size, at cp/cp-objcp- common.c:112 Please submit a full bug report, with preprocessed source if appropriate.
This ICE also occures on a i686 platform
Can you try again?
I have checked it again on ppc and x86_64, it still fails on both systems. On ppc I get: stage1/xgcc -Bstage1/ -B/usr/local/gcc40b/powerpc-unknown-linux-gnu/bin/ -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing- prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style- definition -Werror -DHAVE_CONFIG_H -I. -I. -I../../gcc40/gcc -I../../gcc40/gcc/. -I../../gcc40/gcc/../include -I../../gcc40/gcc/../libcpp/include ../../gcc40/gcc/profile.c -o profile.o xgcc: Internal error: Segmentation fault (program cc1) Please submit a full bug report. On x86_64 it fails with somthing like "unable to detect exception model" Michael Cieslinski
I could not reproduce this on powerpc-darwin, could you try again? This might be a stack overflow but I don't know.
I have rechecked it at x86_64. It occurs only with configure/make bootstrap, not with configure make. Actual error is: stage1/xgcc -Bstage1/ -B/usr/local/gcc40c/x86_64-unknown-linux-gnu/bin/ -c - g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing- prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style- definition -Werror -DHAVE_CONFIG_H -I. -I. -I../../gcc40/gcc - I../../gcc40/gcc/. -I../../gcc40/gcc/../include - I../../gcc40/gcc/../libcpp/include ../../gcc40/gcc/dbxout.c -o dbxout.o ../../gcc40/gcc/dbxout.c: In function 'dbxout_int': ../../gcc40/gcc/dbxout.c:429: internal compiler error: fold check: original tree changed by fold Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. make[2]: *** [dbxout.o] Error 1 make[2]: Leaving directory `/home/cie019/gcc40c/obj/gcc' make[1]: *** [stage2_build] Error 2 make[1]: Leaving directory `/home/cie019/gcc40c/obj/gcc' make: *** [bootstrap] Error 2 I will check it on ppc later Michael Cieslinski
Subject: Bug 17454 CVSROOT: /cvs/gcc Module name: gcc Changes by: sayle@gcc.gnu.org 2005-03-16 02:20:08 Modified files: gcc : ChangeLog tree.c fold-const.c Log message: PR tree-optimization/17454 * tree.c (tree_size): Add case for TREE_BINFO. * fold-const.c (fold_checksum_tree): Only clear the overloaded field TYPE_CACHED_VALUES if TYPE_CACHED_VALUES_P is set. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7865&r2=2.7866 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree.c.diff?cvsroot=gcc&r1=1.468&r2=1.469 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fold-const.c.diff?cvsroot=gcc&r1=1.542&r2=1.543
Fixed at least on the mainline, waiting for Roger to commit it the 4.0 branch after he finishes testing the patch which fixes this. Patch here: <http://gcc.gnu.org/ml/gcc-patches/2005-03/msg01517.html>.
Subject: Bug 17454 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-4_0-branch Changes by: sayle@gcc.gnu.org 2005-03-16 14:29:12 Modified files: gcc : ChangeLog tree.c fold-const.c Log message: PR tree-optimization/17454 * tree.c (tree_size): Add case for TREE_BINFO. * fold-const.c (fold_checksum_tree): Only clear the overloaded field TYPE_CACHED_VALUES if TYPE_CACHED_VALUES_P is set. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.54&r2=2.7592.2.55 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.466.4.1&r2=1.466.4.2 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fold-const.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.517.2.1&r2=1.517.2.2
Fixed.