re PR c++/58481 (Internal compiler error when passing argument packs to base class method inside a lambda)

/cp
2013-09-20  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58481
	* pt.c (tsubst_copy): Use current_nonlambda_class_type to
	call tsubst_baselink.

/testsuite
2013-09-20  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58481
	* g++.dg/cpp0x/lambda/lambda-this17.C: New.

From-SVN: r202797
This commit is contained in:
Paolo Carlini 2013-09-20 21:04:09 +00:00 committed by Paolo Carlini
parent 7691132c91
commit 950e6107f0
4 changed files with 34 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2013-09-20 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58481
* pt.c (tsubst_copy): Use current_nonlambda_class_type to
call tsubst_baselink.
2013-09-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58457

View File

@ -12434,7 +12434,8 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl)
return t;
case BASELINK:
return tsubst_baselink (t, current_class_type, args, complain, in_decl);
return tsubst_baselink (t, current_nonlambda_class_type (),
args, complain, in_decl);
case TEMPLATE_DECL:
if (DECL_TEMPLATE_TEMPLATE_PARM_P (t))

View File

@ -1,3 +1,8 @@
2013-09-20 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58481
* g++.dg/cpp0x/lambda/lambda-this17.C: New.
2013-09-20 Jan-Benedict Glaw <jbglaw@lug-owl.de>
PR target/56875

View File

@ -0,0 +1,21 @@
// PR c++/58481
// { dg-require-effective-target c++11 }
struct Test {
template<typename... Args> inline void triggerTest (Args&&... fargs) { }
};
struct TestPickled : Test {
template<typename... Args> void triggerTest (Args&&... fargs) {
[=](Args... as) {
Test::triggerTest (as...);
} ();
}
};
int main()
{
TestPickled test;
test.triggerTest ();
return 0;
}