https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103321
Vsevolod Livinskiy <vsevolod.livinskij at frtk dot ru> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vsevolod.livinskij at frtk dot ru --- Comment #4 from Vsevolod Livinskiy <vsevolod.livinskij at frtk dot ru> --- The same error can be triggered for X86. Here is the link to the Compiler Explorer: https://godbolt.org/z/8zMhfhs5o This reproducer was found with YARPGen. Reproducer: long a; short b; extern unsigned long d[]; const unsigned long long &e(const unsigned long long &f, const unsigned long long &g) { if (f < g) return g; return f; } const unsigned long long &h(const unsigned long long &f, const unsigned long long &g) { return f < g ? f : g; } void j() { for (int i = 0;; i = 8) d[i] = h(e(a, c[i] && b), 7); } Error: >$ g++ -O2 -c func.cpp func.cpp: In function 'void j()': func.cpp:15:6: error: definition in block 5 does not dominate use in block 3 15 | void j() { | ^ for SSA_NAME: _23 in statement: _6 = PHI <_4(5), _23(3), _23(4)> PHI argument _23 for PHI node _6 = PHI <_4(5), _23(3), _23(4)> during GIMPLE pass: phiopt func.cpp:15:6: internal compiler error: verify_ssa failed 0x141284f verify_ssa(bool, bool) /testing/gcc/gcc_src_master/gcc/tree-ssa.c:1211 0x10e86d5 execute_function_todo /testing/gcc/gcc_src_master/gcc/passes.c:2049 0x10e901b execute_todo /testing/gcc/gcc_src_master/gcc/passes.c:2096 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. gcc version 12.0.0 20211118 (d6ec661e3931773e2f571ed4f6dd8b0402d8687d) (GCC)