Test gcc.c-torture/execute/920302-1.c gets an internal compiler error on arm-none-linux-gnueabi, which began with this patch: r172954 | rguenth | 2011-04-26 09:21:44 +0000 (Tue, 26 Apr 2011) | 12 lines 2011-04-26 Richard Guenther <rguenther@suse.de> PR middle-end/48694 * tree.h (OEP_CONSTANT_ADDRESS_OF): New operand_equal_flag. * fold-const.c (operand_equal_p): For TREE_CONSTANT ADDR_EXPRs compare the operands with OEP_CONSTANT_ADDRESS_OF. Treat trees with TREE_SIDE_EFFECTS equal when OEP_CONSTANT_ADDRESS_OF is set. * gcc.dg/torture/pr48694-1.c: New testcase. * gcc.dg/torture/pr48694-2.c: Likewise Here's the compiler output: /scratch/janisjo/arm-linux-fsf/src/gcc-mainline/gcc/testsuite/gcc.c-torture/execute/920302-1.c: In function 'execute': /scratch/janisjo/arm-linux-fsf/src/gcc-mainline/gcc/testsuite/gcc.c-torture/execute/920302-1.c:27:1: internal compiler error: in push_minipool_fix, at config/arm/arm.c:12107 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions.
There is no assert around in that routine and the file doesn't call operand_equal_p anywhere ... so?
I see the same ICE and test suite FAIL as Janis does, on armv5tel-linux-gnueabi, except I see it on line 11950 which is gcc_assert (fix->forwards || fix->backwards); 4.7-20110423 was OK, 4.7-20110430 and newer show the ICE and FAIL. My config is /mnt/scratch/gcc-4.7-20110521/configure --prefix=/mnt/scratch/install47 --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,java,fortran --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --disable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --disable-sjlj-exceptions --with-arch=armv5te --with-tune=xscale --build=armv5tel-brewer-linux-gnueabi --with-gmp=/home/mikpe/pkgs/linux-armv5l/gmp-4.3.2 --with-mpfr=/home/mikpe/pkgs/linux-armv5l/mpfr-2.4.2 --with-mpc=/home/mikpe/pkgs/linux-armv5l/mpc-0.8.2 --disable-plugin --disable-lto --disable-libmudflap
With sources updated yesterday the ICE is at line 11950. Configured with: /scratch/janisjo/arm-linux-fsf/src/gcc-mainline/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi --enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --enable-shared --enable-lto --enable-symvers=gnu --enable-__cxa_atexit --disable-nls --prefix=/opt/codesourcery --with-sysroot=/opt/codesourcery/arm-none-linux-gnueabi/libc --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --disable-libgomp --enable-poison-system-directories --with-gmp=xxxx --with-mpfr=xxxx --with-mpc=xxxx --with-ppl=xxxx --with-cloog=xxxx --with-libelf=xxxx --with-build-time-tools=xxxx --with-build-sysroot=xxxx
Also see the same ICE.
This is related to PR47719 . Appears to work fine on the 4.6 branch. Atleast an O2 trial didn't blow up. from a backtrace. (gdb)up #3 0x08729c62 in arm_reorg () at /home/ramrad01/sources/fsf/trunk/gcc/config/arm/arm.c:12258 (gdb) p insn $2 = (rtx) 0xb7cf5d14 (gdb) pr (insn 13 12 108 (set (reg:SI 2 r2 [orig:142 D.2035 ] [142]) (zero_extend:SI (mem/u/c/i:HI (symbol_ref/u:SI ("*.LC0") [flags 0x2]) [4 S2 A32]))) /home/ramrad01/sources/fsf/trunk/gcc/testsuite/gcc.c-torture/execute/920302-1.c:14 147 {*arm_zero_extendhisi2} (insn_list:REG_LABEL_OPERAND 30 (expr_list:REG_EQUIV (zero_extend:SI (mem/u/c/i:HI (symbol_ref/u:SI ("*.LC0") [flags 0x2]) [4 S2 A32])) (nil)))) Reproduced with -march=armv5te -marm -mfloat-abi=soft on the command line. cheers Ramana
combine puts 2 and 2 together . (insn 11 10 12 (set (reg/f:SI 154) (mem/u/c/i:SI (symbol_ref/u:SI ("*.LC0") [flags 0x2]) [4 S4 A32])) /home/ramana/cos/git/gcc/gcc/testsuite/gcc.c-torture/execute/920302-1.c:14 -1 (expr_list:REG_EQUAL (label_ref:SI 0) (nil))) (insn 12 11 13 (set (reg:HI 153) (subreg:HI (reg/f:SI 154) 0)) /home/ramana/cos/git/gcc/gcc/testsuite/gcc.c-torture/execute/920302-1.c:14 -1 (nil)) (insn 13 12 0 (set (reg:SI 142 [ D.2035 ]) (zero_extend:SI (reg:HI 153))) /home/ramana/cos/git/gcc/gcc/testsuite/gcc.c-torture/execute/920302-1.c:14 -1 (nil)) Trying 11 -> 12: Successfully matched this instruction: (set (reg/f:HI 153) (mem/u/c/i:HI (symbol_ref/u:SI ("*.LC0") [flags 0x2]) [4 S2 A32])) deferring deletion of insn with uid = 11. modifying insn i3 12 r153:HI=[`*.LC0'] deferring rescan insn with uid = 12. Trying 12 -> 13: Successfully matched this instruction: (set (reg:SI 142 [ D.2035 ]) (zero_extend:SI (mem/u/c/i:HI (symbol_ref/u:SI ("*.LC0") [flags 0x2]) [4 S2 A32]))) deferring deletion of insn with uid = 12. modifying insn i3 13 r142:SI=zero_extend([`*.LC0']) deferring rescan insn with uid = 13. --- (insn 13 12 15 3 (set (reg:SI 142 [ D.2035 ]) (zero_extend:SI (mem/u/c/i:HI (symbol_ref/u:SI ("*.LC0") [flags 0x2]) [4 S2 A32]))) /home/ramana/cos/git/gcc/gcc/testsuite/gcc.c-torture/execute/920302-1.c:14 150 {*arm_zero_extendhisi2_v6} (nil))
This is a dup of bug 49423 which points to the patch which really caused it. *** This bug has been marked as a duplicate of bug 49423 ***