http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51136
Bug #: 51136 Summary: [4.7 Regression] ICE: SIGSEGV in unlink_virtual_phi (tree-flow-inline.h:427) with -O2 -fno-tree-dominator-opts (-ftree-tail-merge) Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: zso...@seznam.cz CC: vr...@gcc.gnu.org Host: x86_64-pc-linux-gnu Target: x86_64-pc-linux-gnu Created attachment 25824 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25824 reduced testcase Compiler output: $ gcc -O -ftree-pre -ftree-tail-merge -fno-tree-dominator-opts testcase.c ==11289== Invalid read of size 8 ==11289== at 0xB29249: unlink_virtual_phi(gimple_statement_d*, tree_node*) (tree-flow-inline.h:427) ==11289== by 0xB2D65F: tail_merge_optimize(unsigned int) (tree-ssa-tail-merge.c:1464) ==11289== by 0xAF5C66: execute_pre(bool) (tree-ssa-pre.c:4919) ==11289== by 0x8E03D7: execute_one_pass(opt_pass*) (passes.c:2074) ==11289== by 0x8E0744: execute_pass_list(opt_pass*) (passes.c:2129) ==11289== by 0x8E0756: execute_pass_list(opt_pass*) (passes.c:2130) ==11289== by 0xA4230D: tree_rest_of_compilation(tree_node*) (tree-optimize.c:420) ==11289== by 0x695C29: cgraph_expand_function(cgraph_node*) (cgraphunit.c:1819) ==11289== by 0x697C0B: cgraph_optimize() (cgraphunit.c:1886) ==11289== by 0x698139: cgraph_finalize_compilation_unit() (cgraphunit.c:1327) ==11289== by 0x57566A: c_write_global_declarations() (c-decl.c:10023) ==11289== by 0x9D55F3: toplev_main(int, char**) (toplev.c:581) ==11289== by 0x674ED2C: (below main) (in /lib64/libc-2.12.2.so) ==11289== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==11289== testcase.c: In function 'foo': testcase.c:4:1: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. or $ /mnt/svn/gcc-trunk/binary-latest/bin/gcc -O2 -fno-tree-dominator-opts testcase.c testcase.c: In function 'foo': testcase.c:3:6: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Tested revisions: r181360 - crash