https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84775
Bug ID: 84775 Summary: ICE on valid code at -O3: in check_loop_closed_ssa_def, at tree-ssa-loop-manip.c:709 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: --- It appears to be a recent regression. $ gcctk -v Using built-in specs. COLLECT_GCC=gcctk COLLECT_LTO_WRAPPER=/home/su/software/tmp/gcc/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/8.0.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto --prefix=/home/su/software/tmp/gcc/gcc-trunk --disable-bootstrap Thread model: posix gcc version 8.0.1 20180309 (experimental) [trunk revision 258374] (GCC) $ $ gcctk -O2 -c small.c $ gcc-7.2.0 -O3 -c small.c $ $ gcctk -O3 -c small.c during GIMPLE pass: ifcvt small.c: In function ‘fn1’: small.c:3:6: internal compiler error: in check_loop_closed_ssa_def, at tree-ssa-loop-manip.c:709 void fn1 () ^~~ 0xe3b38c check_loop_closed_ssa_def ../../gcc-source-trunk/gcc/tree-ssa-loop-manip.c:709 0xe3b4ed check_loop_closed_ssa_bb ../../gcc-source-trunk/gcc/tree-ssa-loop-manip.c:735 0xe3d686 verify_loop_closed_ssa(bool, loop*) ../../gcc-source-trunk/gcc/tree-ssa-loop-manip.c:760 0xbb888b execute_function_todo ../../gcc-source-trunk/gcc/passes.c:2012 0xbb91a9 execute_todo ../../gcc-source-trunk/gcc/passes.c:2048 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, e, f; void fn1 () { while (e) for (f = 0; f < 4; f++) { int h[1]; for (; c; c++) if (a) break; d = a - 4; if (d) b = h[0]; } }