aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp1y/vla7.C
blob: df34c8219dbe317b4698b08247b6fab4d4be440d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// PR c++/55520
// { dg-options "-Wno-vla" }
// { dg-require-effective-target c++11 }

int main(int argc, char** argv)
{
  int x[1][argc];

  [&x](int i) {			// { dg-error "variable.size" }
    x[0][i] = 0;	     	// { dg-prune-output "assignment" }
  }(5);
}