[Bug middle-end/126418] [17 regression] PR113894 introduces new UB in optimized code

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jul 28 00:48:46 GMT 2026


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126418

--- Comment #2 from Drea Pinski <pinskia at gcc dot gnu.org> ---
Just a FYI, I can't figure out a testcase where:
cmp + (-cmp ^ x)

Would wrong code even with maybe introduced the undefined behavior.

That is because if the edge that is defined by -x would have cause undefined
behavior to begin with.

It is definitely good to fix though.


More information about the Gcc-bugs mailing list