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

--- Comment #7 from bin cheng <amker at gcc dot gnu.org> ---
Patch at https://gcc.gnu.org/pipermail/gcc-patches/2020-March/542038.html
It's a latent bug exposed by the mentioned alias analysis change, however:


unsigned char b, f;
short d[1][8][1], *g = &d[0][3][0];

int
main ()
{
  int k[] = { 0, 0, 0, 4, 0, 0 };
  for (int c = 2; c >= 0; c--)
    {
      b = f;
      *g = k[c + 3];
      k[c + 1] = 0;
    }
  for (int i = 0; i < 8; i++)
    if (d[0][i][0] != 0)
      __builtin_abort ();
  return 0;
}

We can't tell no-alias info for pairs <f, *g> and <b, *g>.  Is this expected or
should be improved?

Thanks

Reply via email to