This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/55616] bogus warning about undefined overflow after overflow check
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 07 Dec 2012 14:38:48 +0000
- Subject: [Bug tree-optimization/55616] bogus warning about undefined overflow after overflow check
- Auto-submitted: auto-generated
- References: <bug-55616-4@http.gcc.gnu.org/bugzilla/>
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.