view gcc/testsuite/gcc.dg/torture/pr92088-2.c @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 1830386684a0
children
line wrap: on
line source

/* { dg-do compile } */

void foo(int n)
{
  struct X { int a[n]; } y;

  struct X baz (struct X x)
    {
      x.a[0] = 1;
      return x;
    }

  y.a[0] = 0;
  y = baz(y);
  if (y.a[0] != 1)
    __builtin_abort ();
}