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

--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> ---
There could be 2 steps:

- replace the read with an undefined value (SSA_NAME with GIMPLE_NOP defining
statement). I vaguely remember someone was not enthusiastic about it, but I
don't remember why.

- fold a comparison (other operations as well?) with an undefined value.
Arguably, gcc could pick any value for the result (whichever kills more code?).
It does seem reasonable to pick false for == and true for !=, though for < or >
it is less clear, and if someone does the equivalent of p==p where p is
undefined, it can be surprising.

This is likely to remove a number of uninitialized warnings.

Reply via email to