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

            Bug ID: 99253
           Summary: tree-vect-loop wrong code
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: stefansf at linux dot ibm.com
  Target Milestone: ---
            Target: s390x, x86_64-*-*

int a = 0;
static int b = 0;
long c = 0;

int
main() {
  for (int d = 0; d < 8; d++) {
    a ^= c;
    b = a;
    a ^= 1;
  }
  if (b != 1)
    __builtin_abort();
  return 0;
}

Aborts when built with:
gcc -O3 t.c

Bisection stops at commit 04bff1bbfc11a974342c0eb0c0d65d902e36e82e on IBM Z and
at commit b7ff7cef5005721e78d6936bed3ae1c059b4e8d2 on x86 ¯\_(ツ)_/¯

Reply via email to