https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80764
Bug ID: 80764 Summary: ICE at -O3 in both 32-bit and 64-bit modes on x86_64-linux-gnu (internal compiler error: in verify_loop_structure, at cfgloop.c:1644) Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: chengniansun at gmail dot com Target Milestone: --- $ 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/8.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto --prefix=/usr/local/gcc-trunk --disable-bootstrap Thread model: posix gcc version 8.0.0 20170515 (experimental) [trunk revision 248042] (GCC) $ gcc-trunk -O3 small.c small.c: In function ‘fn1.part.0’: small.c:12:1: error: size of loop 9 should be 6, not 7 } ^ small.c:12:1: error: loop 10’s latch does not have an edge to its header small.c:12:1: internal compiler error: in verify_loop_structure, at cfgloop.c:1644 0x7ba18a verify_loop_structure() ../../gcc-source-trunk/gcc/cfgloop.c:1644 0xb2ae3a execute_function_todo ../../gcc-source-trunk/gcc/passes.c:1984 0xb2b855 execute_todo ../../gcc-source-trunk/gcc/passes.c:2022 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. $ cat small.c int b, d, f, h; char e; int fn1(); int main() { return fn1(); } int fn1(int p1) { for (; d;) for (; e < 3;) { for (; h;) b = fn1(0); return f; } } $