http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58342
Bug ID: 58342 Summary: ICE in propagate_threaded_block_debug_into, at tree-ssa-threadedge.c:623 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: su at cs dot ucdavis.edu The following code causes an ICE when compiled with the current gcc trunk at -O2 and -O3 with -g on x86_64-linux (both 32-bit and 64-bit modes). This is a regression from 4.8.x. This may be the same as 58340, but I couldn't reproduce the ICE using the testcase for 58340 (see below for pt.ii). $ gcc-trunk -v Using built-in specs. COLLECT_GCC=gcc-trunk COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../gcc-trunk/configure --enable-languages=c,c++,objc,obj-c++,fortran,lto --with-gmp=/usr/local/gcc-trunk --with-mpfr=/usr/local/gcc-trunk --with-mpc=/usr/local/gcc-trunk --with-cloog=/usr/local/gcc-trunk --prefix=/usr/local/gcc-trunk Thread model: posix gcc version 4.9.0 20130906 (experimental) [trunk revision 202308] (GCC) $ $ gcc-trunk -m32 -O2 -c small.c $ gcc-trunk -O2 -c small.c $ gcc-4.8 -O2 -g -c small.c $ gcc-trunk -O2 -g -c small.c small.c: In function ‘main’: small.c:8:5: internal compiler error: in propagate_threaded_block_debug_into, at tree-ssa-threadedge.c:623 int main () ^ 0xa93f53 propagate_threaded_block_debug_into(basic_block_def*, basic_block_def*) ../../gcc-trunk/gcc/tree-ssa-threadedge.c:623 0xa94ca2 thread_across_edge(gimple_statement_d*, edge_def*, bool, vec<tree_node*, va_heap, vl_ptr>*, tree_node* (*)(gimple_statement_d*, gimple_statement_d*)) ../../gcc-trunk/gcc/tree-ssa-threadedge.c:1019 0x9fcc34 dom_opt_leave_block ../../gcc-trunk/gcc/tree-ssa-dom.c:1898 0xd46ebf walk_dominator_tree(dom_walk_data*, basic_block_def*) ../../gcc-trunk/gcc/domwalk.c:241 0x9faa02 tree_ssa_dominator_optimize ../../gcc-trunk/gcc/tree-ssa-dom.c:827 0x9faa02 execute ../../gcc-trunk/gcc/tree-ssa-dom.c:951 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. $ $ $ gcc-trunk -O2 -g -c pt.ii $ ------------------------------------- int a, b, c, d; int foo (int x, int y) { return y == 0 ? x : 1 % y; } int main () { c = 0 || a; for (;;) b = foo (d, c) && 1; return 0; }