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

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #8)
> Yes but in this case the mask will 0 forcing it all to 0 . But the mask is
> swapping around to -1 for some reason.

Also if you are worried about that, you can do:
```
int a, b, c, d;
static int e[6]={0,0,0,0,0,0};
int main() {
  for (d = 0; d < 6; d++)
    if (!c)
      e[d] = 0;
  for (; b < 6; b++)
    a = e[b];
  if (a != 0)
    __builtin_abort();
  return 0;
}

```
And compile with `-O3 -fno-unswitch-loops -fallow-store-data-races` to have the
same issue.

Reply via email to