https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68906
Bug ID: 68906 Summary: ICE at -O3 on x86_64-linux-gnu: verify_ssa failed Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: chengniansun at gmail dot com Target Milestone: --- The following code causes an ICE when compiled with the current gcc trunk at -O3 on x86_64-linux-gnu in both 32-bit and 64-bit modes. $: gcc-trunk -v Using built-in specs. COLLECT_GCC=gcc-trunk COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk --enable-languages=c,c++ --disable-werror --enable-multilib Thread model: posix gcc version 6.0.0 20151214 (experimental) [trunk revision 231607] (GCC) $: $: gcc-trunk -c -g -O3 -m32 small.c small.c: In function ‘fn1’: small.c:4:5: error: definition in block 6 does not dominate use in block 7 int fn1() { ^~~ for SSA_NAME: e_14 in statement: # DEBUG f => e_14 small.c:4:5: internal compiler error: verify_ssa failed 0xce6fe2 verify_ssa(bool, bool) ../../gcc-trunk/gcc/tree-ssa.c:1039 0xa1f9dd execute_function_todo ../../gcc-trunk/gcc/passes.c:1965 0xa2027b execute_todo ../../gcc-trunk/gcc/passes.c:2010 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 -c -g -O3 -m64 small.c small.c: In function ‘fn1’: small.c:4:5: error: definition in block 6 does not dominate use in block 7 int fn1() { ^~~ for SSA_NAME: e_14 in statement: # DEBUG f => e_14 small.c:4:5: internal compiler error: verify_ssa failed 0xce6fe2 verify_ssa(bool, bool) ../../gcc-trunk/gcc/tree-ssa.c:1039 0xa1f9dd execute_function_todo ../../gcc-trunk/gcc/passes.c:1965 0xa2027b execute_todo ../../gcc-trunk/gcc/passes.c:2010 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. $: $: $: cat small.c int a; volatile int b; short c, d; int fn1() { int e; for (;;) { a = 3; if (c) continue; e = 0; for (; e > -30; e--) if (b) { int f = e; return d; } } }