https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81627
Bug ID: 81627 Summary: ICE on valid code at -O3: in check_loop_closed_ssa_use, at tree-ssa-loop-manip.c:707 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 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 20170731 (experimental) [trunk revision 250725] (GCC) $ $ gcc-trunk -O2 small.c; ./a.out $ $ gcc-trunk -O3 small.c during GIMPLE pass: pcom small.c: In function ‘fn1’: small.c:3:6: internal compiler error: in check_loop_closed_ssa_use, at tree-ssa-loop-manip.c:707 void fn1 () ^~~ 0xdd5aed check_loop_closed_ssa_use ../../gcc-source-trunk/gcc/tree-ssa-loop-manip.c:706 0xdd8b5e verify_loop_closed_ssa(bool) ../../gcc-source-trunk/gcc/tree-ssa-loop-manip.c:751 0xb6b1a9 execute_function_todo ../../gcc-source-trunk/gcc/passes.c:2008 0xb6bac9 execute_todo ../../gcc-source-trunk/gcc/passes.c:2044 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. $ ------------------------------------- int a, b, c, d[6], e, f; void fn1 () { for (b = 1; b < 5; b++) { for (c = 0; c < 5; c++) d[b] = e; if (a) f++; d[b + 1] = 1; } } int main () { fn1 (); return 0; }