https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66793
Bug ID: 66793 Summary: ICE at -Os and above on x86_64-linux-gnu (verify_flow_info failed) Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: su at cs dot ucdavis.edu Target Milestone: --- The following code causes an ICE when compiled with the current gcc trunk at -Os and above on x86_64-linux-gnu in both 32-bit and 64-bit modes. It is a regression from 5.1.x. $ 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/6.0.0/lto-wrapper Target: x86_64-unknown-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 20150707 (experimental) [trunk revision 225501] (GCC) $ $ gcc-trunk -O1 small.c $ gcc-5.1 -Os small.c $ $ gcc-trunk -Os small.c small.c: In function ‘main’: small.c:18:1: error: control flow in the middle of basic block 2 main () ^ small.c:18:1: internal compiler error: verify_flow_info failed 0x6fa932 verify_flow_info() ../../gcc-trunk/gcc/cfghooks.c:268 0xbfac91 cleanup_tree_cfg_noloop ../../gcc-trunk/gcc/tree-cfgcleanup.c:751 0xbfac91 cleanup_tree_cfg() ../../gcc-trunk/gcc/tree-cfgcleanup.c:800 0xaeeb84 execute_function_todo ../../gcc-trunk/gcc/passes.c:1910 0xaef433 execute_todo ../../gcc-trunk/gcc/passes.c:2014 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. $ ----------------------------------- int a, b, c; struct S0 { int f1; } *d; void fn1 (struct S0 p) { for (p.f1 = 0; p.f1 < 1; p.f1++) c = a && b ? a && b : 1; for (; c;) ; } int main () { struct S0 **f = &d; d = 0; fn1 (**f); return 0; }