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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Slightly cleaned up testcase:

struct S { unsigned a[10]; unsigned y; unsigned b[6]; } g[2];

__attribute__((noinline, noclone)) int
test (int x)
{
  struct S e[2] = { g[0], g[1] };
  int r = 0;
  if (x >= 0)
    {
      r++;
      e[1].y++;
    }
  g[1] = e[1];
  return r;
}

int
main ()
{
  test (1);
  if (g[1].y != 1)
    __builtin_abort ();
  return 0;
}

Reply via email to