re PR c++/79180 (Nested lambda-capture causes segfault for parameter pack)
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / lambda / lambda-nested8.C
blob5a6f47c1089a2cb469951785af4441b1e4292ec8
1 // PR c++/79180
2 // { dg-do run { target c++11 } }
4 void
5 foo (int a)
7   if (a != 127)
8     __builtin_abort ();
11 template <typename... Args>
12 void
13 bar (Args &&... args)
15   [&]() { [&]() { foo (args...); } (); } ();
18 int
19 main ()
21   int x = 127;
22   bar (x);