re PR c++/79180 (Nested lambda-capture causes segfault for parameter pack)
[official-gcc.git] / gcc / testsuite / g++.dg / torture / pr79180.C
blob2e3992ccd08c64e9c0b18595eb47e90434ed1f09
1 // { dg-do run }
2 // { dg-options "-Wall -std=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);