Debian Codegraph @

gcc/testsuite/g++.dg/cpp1y/lambda-generic-vla1.C

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