8sa1-gcc/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested8.C
Paolo Carlini bac1187dad re PR c++/79180 (Nested lambda-capture causes segfault for parameter pack)
2017-10-02  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/79180
	* g++.dg/cpp0x/lambda/lambda-nested8.C: New.
	* g++.dg/torture/pr79180.C: Likewise.

	PR c++/71386
	* g++.dg/cpp1y/lambda-generic-nested1.C: New.

From-SVN: r253350
2017-10-02 12:40:26 +00:00

24 lines
260 B
C

// PR c++/79180
// { dg-do run { target c++11 } }
void
foo (int a)
{
if (a != 127)
__builtin_abort ();
}
template <typename... Args>
void
bar (Args &&... args)
{
[&]() { [&]() { foo (args...); } (); } ();
}
int
main ()
{
int x = 127;
bar (x);
}