https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97315
--- Comment #8 from Andrew Macleod <amacleod at redhat dot com> ---
(In reply to David Binderman from comment #6)
> I get something similar with this test case:
>
> int a;
> void b() {
> if (a >= 2147483647)
> c(a + 1);
> }
This one is slightly different.
Still triggering in the same place, but the difference in the singleton is the
result of the calculation of:
[+INF, +INF] + 1
EVRP is reporting [-INF, -INF], and range-ops is calculating [+INF, +INF]
Is there a correct answer, or does it matter?
The code we imported for handling overflow always sets the bound to +INF if an
overflow happens, and it happens on both bounds, so we get [+INF, +INF]. I'm
guessing because its a single value EVRP actually folded the value regardless
of overflow?
Or maybe it should be UNDEFINED?
Andrew