[Bug tree-optimization/55616] bogus warning about undefined overflow after overflow check

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Dec 7 14:39:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55616

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-12-07
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> 2012-12-07 14:38:48 UTC ---
It's not VRP that warns here but we perform the simplification before reaching
VRP, from forward-propagation which just sees

  long b = a + C;
  if (a > b)
    something ();

and uses fold to simplify a > a + C.  There it assumes that overflow
does not occur.



More information about the Gcc-bugs mailing list