[regehr@gamow tmp400]$ current-gcc -c -O2 small.c small.c: In function 'func_37': small.c:11:6: internal compiler error: in gen_lsm_tmp_name, at tree-ssa-loop-im.c:1812 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. [regehr@gamow tmp400]$ cat small.c unsigned g_5; int g_7; int g_23[2]; int *g_29 = &g_23[0]; int **g_59; unsigned long g_186; int foo (int, int); int bar (int); void func_37 (long p_38) { int *l_39 = &g_7; *l_39 = (*l_39 || (foo (((*g_29 != *l_39, ((bar (g_59 != &l_39), 0), 0))), 0))); foo (*l_39, 0); int **l_256 = &l_39; { for (0; g_186; 0) { *l_256 = *l_256; if (g_5) goto lbl_270; *l_39 &= 0; } } lbl_270: ; } [regehr@gamow tmp400]$ current-gcc -v Using built-in specs. COLLECT_GCC=current-gcc COLLECT_LTO_WRAPPER=/uusoc/exports/scratch/regehr/z/compiler-install/gcc-r158079-install/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../configure --with-libelf=/usr/local --enable-lto --prefix=/home/regehr/z/compiler-install/gcc-r158079-install --program-prefix=r158079- --enable-languages=c,c++ Thread model: posix gcc version 4.6.0 20100407 (experimental) (GCC)
It is caused by revision 148718: http://gcc.gnu.org/ml/gcc-cvs/2009-06/msg00701.html
Mine then.
Unfolded *&g_7 from PRE. I have a patch.
Subject: Bug 43679 Author: rguenth Date: Thu Apr 8 10:21:23 2010 New Revision: 158112 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158112 Log: 2010-04-08 Richard Guenther <rguenther@suse.de> PR tree-optimization/43679 * tree-ssa-pre.c (eliminate): Only propagate copies. * gcc.c-torture/compile/pr43679.c: New testcase. Added: trunk/gcc/testsuite/gcc.c-torture/compile/pr43679.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-ssa-pre.c
Subject: Bug 43679 Author: rguenth Date: Thu Apr 8 10:25:57 2010 New Revision: 158113 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158113 Log: 2010-04-08 Richard Guenther <rguenther@suse.de> PR tree-optimization/43679 * tree-ssa-pre.c (eliminate): Only propagate copies. * gcc.c-torture/compile/pr43679.c: New testcase. Added: branches/gcc-4_5-branch/gcc/testsuite/gcc.c-torture/compile/pr43679.c Modified: branches/gcc-4_5-branch/gcc/ChangeLog branches/gcc-4_5-branch/gcc/testsuite/ChangeLog branches/gcc-4_5-branch/gcc/tree-ssa-pre.c
Fixed.