1 // PR c++/70338 2 // { dg-do compile { target c++11 } } 3 // { dg-options "-g" } 4 // { dg-require-effective-target alloca } 5 6 template<typename T> 7 void foo(int x)8foo (int x) 9 { 10 T a[x]; 11 auto b = [&]() { for (auto &c: a) c = 0.; }; 12 } 13 14 int main()15main () 16 { 17 foo<double> (3); 18 } 19