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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vries at gcc dot gnu.org

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
In particular, the following example values to f1 cause wrong behavior:

f1 (p=p@entry=0x7ffff7fbf000 "", i=i@entry=0xfffffffffffffffe, 
    n=n@entry=0xffff800008040ffe) at t.c:8

With mbz "i_5(D) + 1 > n_11(D)" and niter "(n_11(D) - i_5(D)) + -1"

We then check that p - i does not overflow.

But rewrite the exit test as "{ p, +, 1 } < p + n - i" from "{ i, +, 1 } < n".
So we subtract p and add i on both sides.  We have to prove that n + (p - i)
does not overflow, but we just prove that for p = p + i, the i is equal to i?!

In particular

  /* Finally, check that CAND->IV->BASE - CAND->IV->STEP * A does not
     overflow.  */

cand->iv->base == p_6 == p_4(D) + i_5(D) == 0x7ffff7fbeffe
cand->iv->step == 1, A == i_5(D) == 0xfffffffffffffffe

But I'm confused what we are checking here.  The new exits RHS is
-2U for the entry values at hand.

Tom, you are listed as author of this code - do you remember anything about it?
I'm inclined to wipe it completely...

Reply via email to