https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112303
Bug ID: 112303 Summary: ICE on valid code at -O3 on x86_64-linux-gnu: verify_flow_info 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: --- This appears to be a recent regression. Compiler Explorer: https://godbolt.org/z/9h7K8eqs8 [578] % 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/14.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 Thread model: posix Supported LTO compression algorithms: zlib gcc version 14.0.0 20231030 (experimental) (GCC) [579] % [579] % gcctk -O2 -c small.c [580] % [580] % gcctk -O3 -c small.c small.c: In function ājā: small.c:3:6: error: count of bb 228 not initialized 3 | int *j() { | ^ during GIMPLE pass: cunroll small.c:3:6: internal compiler error: verify_flow_info failed 0xbafcaf verify_flow_info() ../../gcc-trunk/gcc/cfghooks.cc:287 0x11718ff checking_verify_flow_info() ../../gcc-trunk/gcc/cfghooks.h:214 0x11718ff cleanup_tree_cfg_noloop ../../gcc-trunk/gcc/tree-cfgcleanup.cc:1154 0x11718ff cleanup_tree_cfg(unsigned int) ../../gcc-trunk/gcc/tree-cfgcleanup.cc:1205 0x1295dbd tree_unroll_loops_completely ../../gcc-trunk/gcc/tree-ssa-loop-ivcanon.cc:1565 0x1295ed3 execute ../../gcc-trunk/gcc/tree-ssa-loop-ivcanon.cc:1673 0x1295ed3 execute ../../gcc-trunk/gcc/tree-ssa-loop-ivcanon.cc:1663 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. [581] % [581] % cat small.c int a, b, d, e, f, **g, h; char c; int *j() { for (int i = 0; i < 3; i++) { for (h = 0; h < 2; h++) ; if (!b) break; } while (f) while (e) { c = 0; while (d) while (a) *g = j(); } return 0; }