1 // N3639 allows initialization and capture of VLAs
2 // { dg-do run { target c++11 } }
3 // { dg-options "-Wno-vla" }
4 // { dg-require-effective-target alloca }
5 
f(int n)6 void f(int n)
7 {
8   int ar[n] = { 42 };
9   auto l = [&] { return ar[0]; };
10   if (l() != 42) __builtin_abort ();
11 }
12 
main()13 int main()
14 {
15   f(1);
16 }
17