aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/ext/vla14.C
blob: 278cb63b938599f19405af2a733b3c4fe0171f55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// PR c++/21113
// { dg-options "" }

void
f (int n)
{
  goto label; // { dg-error "from here" }
  int a[n]; // { dg-error "crosses initialization" }
label: // { dg-error "jump to label" }
  ;
}

void
g (int n)
{
  switch (1)
  {
  case 1:
    int (*a)[n]; // { dg-error "crosses initialization" }
  default: // { dg-error "jump to case label" }
    ;
  }
}