blob: 010b54cd41c6379aa20c514d27eb3f9ab2d31016 [file] [log] [blame]
// N3639 allows initialization and capture of VLAs
// { dg-do run { target c++11 } }
// { dg-options "-Wno-vla" }
// { dg-require-effective-target alloca }
void f(int n)
{
int ar[n] = { 42 };
auto l = [&] { return ar[0]; };
if (l() != 42) __builtin_abort ();
}
int main()
{
f(1);
}