https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93301
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- So we perform if-conversion on the comparison with an undefined value and from there things go downhill (guess DOM would also happily propagate equivalences). I don't think that C guarantees that 'y' has the same value if (x == y) { <--- here b = 1; z = x; } else { b = 0; z = y; <--- and here } at least I'd be surprised. Note whether something is initialized or not is not readily visible in general (it is for this particular testcase of course), so there cannot be a "fix" that works in all cases. My solution would be to make program behavior undefined (which as outlined above it probably already is).