http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55964
Bug #: 55964 Summary: Segmentation fault with -O -ftree-loop-distribution -funswitch-loops Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: antoine.balest...@gmail.com GCC 4.7.2 and 4.8.0 as of 20130112 fail to compile the following testcase with the flags -O -ftree-loop-distribution -funswitch-loops. $ cat segfault.c int a, b; void f(void) { lbl1: for(b = 0; b < 1; b++) { int u = 1; if((b %= 0) * (b ? 0 : a) - 1 && (u /= 0)) { int *q = &u, **k = q; goto lbl1; lbl2: lbl3: a = **k; goto lbl2; } } goto lbl3; } $ xgcc -w -O -ftree-loop-distribution -funswitch-loops segfault.c segfault.c: In function âfâ: segfault.c:3:6: internal compiler error: Segmentation fault void f(void) ^ 0x8da6df crash_signal ../../srcdir/gcc/toplev.c:332 0xa8f61b rename_use_op ../../srcdir/gcc/tree-vect-loop-manip.c:53 0xa90777 rename_variables_in_bb(basic_block_def*) ../../srcdir/gcc/tree-vect-loop-manip.c:93 0xa9082d rename_variables_in_loop(loop*) ../../srcdir/gcc/tree-vect-loop-manip.c:109 0x9447e3 copy_loop_before ../../srcdir/gcc/tree-loop-distribution.c:220 0x9447e3 generate_loops_for_partition ../../srcdir/gcc/tree-loop-distribution.c:254 0x9447e3 generate_code_for_partition ../../srcdir/gcc/tree-loop-distribution.c:539 0x947891 ldist_gen ../../srcdir/gcc/tree-loop-distribution.c:1405 0x947891 distribute_loop ../../srcdir/gcc/tree-loop-distribution.c:1476 0x947891 tree_loop_distribution ../../srcdir/gcc/tree-loop-distribution.c:1548 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions.