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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Slightly cleaned up testcase, -O3 -msse4 is what is needed to reproduce:

typedef __SIZE_TYPE__ size_t;
struct S { unsigned char *a, *b; };

void
foo (struct S x)
{
  for (size_t i = x.b - x.a; i > 0; --i)
    {
      size_t t = x.b - x.a;
      size_t u = i - 1;
      if (u >= t)
        __builtin_abort ();
      if (x.a[i - 1]--)
        break;
    }
}

Reply via email to