Hi Ulrich,
Before I build the cross compiler for ARM target I do a bootstrap process of an i686 compiler on the same code base to use that one building the cross compiler to reduce the chance of seeing subtle problems late in the game. This process unveiled a x86 bootstrap regression with some of your changes on the Linaro 4.7 branch.
It all boils down to the following set of changes you did:
commit c904094f2421bbd5d2cab6d7fbccecf055509629 Author: Ulrich Weigand uweigand@de.ibm.com Date: Mon Jul 16 16:31:58 2012 +0200
Update to exactly reflect upstream version.
commit bf378903a1b749b904ae64635182e7fc9b43e0e4 Author: Ulrich Weigand uweigand@de.ibm.com Date: Tue Jul 10 15:46:51 2012 +0200
Fix backport.
commit e0c3b0a21916ffafc058cd88d82423d87ce77b50 Author: Ulrich Weigand uweigand@de.ibm.com Date: Mon Jul 9 22:52:10 2012 +0200
Fix LP 1020601.
This is the introduction of optimize_unreachable in gcc/tree-ssa-ccp.c.
When configuring with
../gcc/configure --host=i686-build_pc-linux-gnu --build=i686-build_pc-linux-gnu --target=i686-build_pc-linux-gnu --prefix=/ --libexecdir=//lib --program-prefix=i686-build_pc-linux-gnu- --with-sysroot=/user/rschiele/l/builddir/i686-build_pc-linux-gnu/sysroot --with-local-prefix=/user/rschiele/l/builddir/i686-build_pc-linux-gnu/sysroot --with-gmp=/user/rschiele/l/builddir/i686-build_pc-linux-gnu/sysroot/usr --with-mpfr=/user/rschiele/l/builddir/i686-build_pc-linux-gnu/sysroot/usr --with-mpc=/user/rschiele/l/builddir/i686-build_pc-linux-gnu/sysroot/usr --with-cloog=/user/rschiele/l/builddir/i686-build_pc-linux-gnu/sysroot/usr --with-ppl=/user/rschiele/l/builddir/i686-build_pc-linux-gnu/sysroot/usr '--with-host-libstdcxx=/user/rschiele/l/builddir/i686-build_pc-linux-gnu/tools/lib/libstdc++.a -lm' --disable-multilib --disable-checking --enable-__cxa_atexit --enable-libmudflap --enable-libgomp --enable-libssp --enable-languages=c,c++ --enable-threads=posix --disable-libstdcxx-pch --enable-c99 --enable-long-long --disable-shared
It fails in the bootstrap at
/user/rschiele/l/src/gccbuild/./prev-gcc/g++ -B/user/rschiele/l/src/gccbuild/./prev-gcc/ -B//i686-build_pc-linux-gnu/bin/ -nostdinc++ -B/user/rschiele/l/src/gccbuild/prev-i686-build_pc-linux-gnu/libstdc++-v3/src/.libs -B/user/rschiele/l/src/gccbuild/prev-i686-build_pc-linux-gnu/libstdc++-v3/libsupc++/.libs -I/user/rschiele/l/src/gccbuild/prev-i686-build_pc-linux-gnu/libstdc++-v3/include/i686-build_pc-linux-gnu -I/user/rschiele/l/src/gccbuild/prev-i686-build_pc-linux-gnu/libstdc++-v3/include -I/user/rschiele/l/src/gcc/libstdc++-v3/libsupc++ -L/user/rschiele/l/src/gccbuild/prev-i686-build_pc-linux-gnu/libstdc++-v3/src/.libs -L/user/rschiele/l/src/gccbuild/prev-i686-build_pc-linux-gnu/libstdc++-v3/libsupc++/.libs -c -g -O2 -gtoggle -DIN_GCC -fno-exceptions -fno-rtti -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -I/user/rschiele/l/builddir/i686-build_pc-linux-gnu/sysroot/usr/include -I/user/rschiele/l/builddir/i686-build_pc-linux-gnu/sysroot/usr/include -I/user/rschiele/l/builddir/i686-build_pc-linux-gnu/sysroot/usr/include -I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/bid -I../libdecnumber -I/user/rschiele/l/builddir/i686-build_pc-linux-gnu/sysroot/usr/include -I/user/rschiele/l/builddir/i686-build_pc-linux-gnu/sysroot/usr/include ../../gcc/gcc/sel-sched.c -o sel-sched.o ../../gcc/gcc/sel-sched.c: In function 'void sel_sched_region_2(int)': ../../gcc/gcc/sel-sched.c:7472:1: error: mismatching comparison operand types struct rtx_def * bool if (insn_1716 == 0)
../../gcc/gcc/sel-sched.c:7472:1: internal compiler error: verify_gimple failed Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html for instructions.
Note, that the --disable-checking is essential to reproduce. As soon as you do --enable-checking the bootstrap completes successfully. I would assume that you then still have the bug in the compiler but it is just subtle enough not to be triggered then.
Reverting your mentioned changes fixes this problem.
If you need further information about my environment to reproduce the problem feel free to contact me.
Greetings, Robert