[Bug tree-optimization/81388] Incorrect code generation with -O1 -fno-strict-overflow

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jul 11 03:13:00 GMT 2017


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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |---

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
void bar();
void foo(char *dst)
{
        char *const end = dst;
        do {
                bar();
                dst += 2;
        } while (dst < end);
}

Hmm actually I am backwards here.  end + 2 < end is always false.


More information about the Gcc-bugs mailing list