summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-vla5.C
blob: f3390b2d09f0b31f4913eb96ff05669c63aac567 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// PR c++/86216
// { dg-do compile { target c++11 } }
// { dg-additional-options -Wno-vla }

template <typename T> void b(int n, T arg) {
  int buffer[arg];
  int buffer2[arg][arg];
  [&] {
    n = sizeof(buffer);
    n = sizeof(buffer2);	// { dg-bogus "sorry" "" { xfail *-*-* } }
  }();
}
int main() { b(2, 3); }