This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/25145] missed VRP opportunity
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Nov 2005 17:34:49 -0000
- Subject: [Bug tree-optimization/25145] missed VRP opportunity
- References: <bug-25145-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from pinskia at gcc dot gnu dot org 2005-11-29 17:34 -------
(In reply to comment #5)
> Note this was the simple fix which exposes those latent bugs as far as I can
> see that should work, we get the correct range but the rest of VRP goes
> bonkers:
I should also note it does not do the correct thing for -fwrapv either.
For the testcase in comment #1:
int f(int i, int j )
{
int k;
k = i+ - 1;
return k < i;
}
i = INT_MIN
k will equal INT_MAX so the comparision will be wrong to return true as INT_MAX
is not less than INT_MIN.
VRP does not like symbolic ranges at all.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25145