summaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/auto-init-16.c
blob: 3714bc3212568413df214e64052509455069eb3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* Verify the auto initialization of nested VLA.  */
/* { dg-do compile } */
/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-tree-gimple" } */
/* { dg-require-effective-target alloca } */

void g(void *);

void foo(int a)
{
  int x[a][a];
  g(x);
}

/* { dg-final { scan-tree-dump ".DEFERRED_INIT \\(D.\\d*, 1, \&\"x\"" "gimple" } } */