https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111387
Bug ID: 111387 Summary: ICE on valid code at -O2 and -O3: 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: --- This appears to be a recent regression. Compiler Explorer: https://godbolt.org/z/9v9T5bfz9 [517] % gcctk -v Using built-in specs. COLLECT_GCC=gcctk COLLECT_LTO_WRAPPER=/local/home/suz/suz-local/software/local/gcc-trunk/bin/../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 20230912 (experimental) (GCC) [518] % [518] % gcctk -O2 small.c small.c: In function ‘main’: small.c:6:5: error: definition in block 5 does not dominate use in block 2 6 | int main() { | ^~~~ for SSA_NAME: l_23 in statement: _4 = {0, l_23}; during GIMPLE pass: slp small.c:6:5: internal compiler error: verify_ssa failed 0x126622d verify_ssa(bool, bool) ../../gcc-trunk/gcc/tree-ssa.cc:1203 0xee7085 execute_function_todo ../../gcc-trunk/gcc/passes.cc:2095 0xee74db execute_todo ../../gcc-trunk/gcc/passes.cc:2142 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. [519] % [519] % cat small.c struct { unsigned a; unsigned b; } c; int d, e, f, g, h; int main() { if (c.b && g && g > 7) goto i; j: if (c.a) { int k = 0; unsigned l = c.b; if (0) { m: k = l = c.b; } c.a = k; c.b = l; } if (0) { i: goto m; } if (d) goto j; for (f = 5; f; f--) if (h) e = 0; return 0; }