]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/58481 (Internal compiler error when passing argument packs to base class...
authorPaolo Carlini <paolo.carlini@oracle.com>
Fri, 20 Sep 2013 21:04:09 +0000 (21:04 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 20 Sep 2013 21:04:09 +0000 (21:04 +0000)
/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

gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this17.C [new file with mode: 0644]

index 5ee1f9173b0b6acecc1cd7a4fb83f338337ec48e..a542ab1ffa3cfa08d9e5ca51143aa12494cc6045 100644 (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
index e0b71108fcf04fb5553d268c741cb1d2e1b73d95..b330b78cbc84512610bc899ea101efba6497d555 100644 (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))
index cef626ab314e3a59149684cf503b39a65ad7648b..2fc781a3e37b4b6462c365f95daaa4a98ea5d650 100644 (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
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this17.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this17.C
new file mode 100644 (file)
index 0000000..2386e6b
--- /dev/null
@@ -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;
+}