summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2006-06-29 01:27:17 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2006-06-29 01:27:17 +0000
commita589f7967ccc42f329a1627c541db03478c59eeb (patch)
tree5bc7479a0d5d63b578fd46abb4ba0da9d84411b2
parentd0fb9d56515b7c0b372f02cb505a830e5b0599e2 (diff)
downloadgcc-a589f7967ccc42f329a1627c541db03478c59eeb.tar.gz
PR c++/27424
* pt.c (convert_template_argument): Pass all template arguments on to coerce_template_template_parms. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115063 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/pt.c5
-rw-r--r--gcc/testsuite/g++.dg/template/ttp20.C11
3 files changed, 18 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index e68602f3e86..1557a7616ee 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2006-06-28 Jason Merrill <jason@redhat.com>
+
+ PR c++/27424
+ * pt.c (convert_template_argument): Pass all template arguments
+ on to coerce_template_template_parms.
+
2006-06-25 Lee Millward <lee.millward@gmail.com>
Mark Mitchell <mark@codesuorcery.com>
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 89afb5fe3b9..a81f6a05935 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -3837,11 +3837,8 @@ convert_template_argument (tree parm,
tree in_decl)
{
tree val;
- tree inner_args;
int is_type, requires_type, is_tmpl_type, requires_tmpl_type;
- inner_args = INNERMOST_TEMPLATE_ARGS (args);
-
if (TREE_CODE (arg) == TREE_LIST
&& TREE_CODE (TREE_VALUE (arg)) == OFFSET_REF)
{
@@ -3933,7 +3930,7 @@ convert_template_argument (tree parm,
if (coerce_template_template_parms (parmparm, argparm,
complain, in_decl,
- inner_args))
+ args))
{
val = arg;
diff --git a/gcc/testsuite/g++.dg/template/ttp20.C b/gcc/testsuite/g++.dg/template/ttp20.C
new file mode 100644
index 00000000000..0d1784c9f82
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/ttp20.C
@@ -0,0 +1,11 @@
+// PR c++/27424
+// Bug: failing to substitute the 'int' into C
+
+template<typename T> struct A
+{
+ template<template<T> class> struct B {};
+ template<T> struct C;
+ B<C> b;
+};
+
+A<int> a;