https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109689
--- Comment #7 from Zhendong Su <zhendong.su at inf dot ethz.ch> --- Another related and smaller reproducer: [514] % gcctk -O3 -fno-tree-loop-ivcanon small.c during GIMPLE pass: ch_vect small.c: In function ‘main’: small.c:3:5: internal compiler error: in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:647 3 | int main() { | ^~~~ 0x81089b check_loop_closed_ssa_def ../../gcc-trunk/gcc/tree-ssa-loop-manip.cc:647 0x1137d37 check_loop_closed_ssa_bb ../../gcc-trunk/gcc/tree-ssa-loop-manip.cc:672 0x1138116 verify_loop_closed_ssa(bool, loop*) ../../gcc-trunk/gcc/tree-ssa-loop-manip.cc:697 0x1138116 verify_loop_closed_ssa(bool, loop*) ../../gcc-trunk/gcc/tree-ssa-loop-manip.cc:681 0xe9ff39 execute_function_todo ../../gcc-trunk/gcc/passes.cc:2116 0xea032b execute_todo ../../gcc-trunk/gcc/passes.cc:2152 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. [515] % [515] % cat small.c int a; unsigned c; int main() { L: if (c) for (; c < 2;) { int e; for (a = 0; a < 2; a++) { c++; while (e) goto L; } } return 0; }