https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106521
Bug ID: 106521 Summary: ICE at -O1 with "-floop-unroll-and-jam --param unroll-jam-min-percent=0": verify_ssa failed Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zhendong.su at inf dot ethz.ch Target Milestone: --- It appears to be a recent regression (and possibly related to PR106249). Compiler Explorer: https://godbolt.org/z/Tanf9axav [545] % gcctk -v Using built-in specs. COLLECT_GCC=gcctk COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/13.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-trunk/configure --disable-bootstrap --enable-checking=yes --prefix=/local/suz-local/software/local/gcc-trunk --enable-sanitizers --enable-languages=c,c++ --disable-werror --enable-multilib --with-system-zlib Thread model: posix Supported LTO compression algorithms: zlib gcc version 13.0.0 20220803 (experimental) [master r13-1950-g9bb19e143cf] (GCC) [546] % [546] % gcctk -O1 -floop-unroll-and-jam --param unroll-jam-min-percent=0 small.c small.c: In function ‘main’: small.c:4:5: error: definition in block 30 does not dominate use in block 33 4 | int main() { | ^~~~ for SSA_NAME: b_lsm.15_82 in statement: b_lsm.15_23 = PHI <b_lsm.15_8(22), b_lsm.15_82(33)> PHI argument b_lsm.15_82 for PHI node b_lsm.15_23 = PHI <b_lsm.15_8(22), b_lsm.15_82(33)> during GIMPLE pass: unrolljam small.c:4:5: internal compiler error: verify_ssa failed 0x11356ef verify_ssa(bool, bool) ../../gcc-trunk/gcc/tree-ssa.cc:1211 0x105fb5b rewrite_into_loop_closed_ssa_1 ../../gcc-trunk/gcc/tree-ssa-loop-manip.cc:576 0x105fb5b rewrite_into_loop_closed_ssa(bitmap_head*, unsigned int) ../../gcc-trunk/gcc/tree-ssa-loop-manip.cc:626 0x1c94c2d tree_loop_unroll_and_jam ../../gcc-trunk/gcc/gimple-loop-jam.cc:612 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. [547] % [547] % cat small.c short a, b, e; volatile long c; long d; int main() { for (; d; d++) { long g = a = 1; for (; a; a++) { g++; c; } g && (b = e); } return 0; }