1 // PR c++/59271
2 // { dg-do compile { target c++14 } }
3 // { dg-options "-Wno-vla" }
4 // { dg-require-effective-target alloca }
5 
6 extern "C" int printf (const char *, ...);
7 
f(int n)8 void f(int n)
9 {
10   int  a[n];
11 
12   for (auto& i : a)
13     {
14       i = &i - a;
15     }
16 
17   [&a] (auto m)
18     {
19       for (auto i : a)
20 	{
21 	  printf ("%d", i);
22 	}
23 
24       return m;
25     };
26 }
27