re PR c++/59271 (a.C:16:21: internal compiler error: in strip_typedefs, at cp/tree...
[gcc.git] / gcc / testsuite / g++.dg / cpp1y / lambda-generic-vla1.C
1 // PR c++/59271
2 // { dg-options -std=c++1y }
3
4 extern "C" int printf (const char *, ...);
5
6 void f(int n)
7 {
8 int a[n];
9
10 for (auto& i : a)
11 {
12 i = &i - a;
13 }
14
15 [&a] (auto m)
16 {
17 for (auto i : a)
18 {
19 printf ("%d", i);
20 }
21
22 return m;
23 };
24 }