[Bug tree-optimization/91227] pointer relational expression not folded but equivalent inequality is

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jul 23 07:53:00 GMT 2019


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2019-07-23
     Ever confirmed|0                           |1

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Hmm, non-equality compares of different objects produce unspecified results,
no?
In those cases we usally are simply conservative...

Otherwise we could simply fold all relations of non-aliasing pointers to false.
Thus p >= a || p < a -> false.  GIGO.


More information about the Gcc-bugs mailing list