[Bug tree-optimization/96108] Different behavior in DSE pass
rguenth at gcc dot gnu.org
Wed Jul 8 10:28:15 GMT 2020
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
The testcase is of course invoking undefined behavior since it dereferences an
uninitialized pointer. I'm not sure there was intentional changes to DSE here
but eliding the store looks reasonable to me (though replacing it with a
trap might be good as well - see other discussions about undefinedness).
Thus confirmed - 7.5 removes the store while trunk does not. But it may
be a deliberate change.
More information about the Gcc-bugs