aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2013-05-09 18:11:53 +0000
committerJason Merrill <jason@redhat.com>2013-05-09 18:11:53 +0000
commit3342703257576141d1973fd2a6623d2ffde744e7 (patch)
treebe0bbf0ab75f35c74086cb90a58b6a65ba8c9529 /gcc/cp
parentc43cea83a4818a5e4ed480c3a012e5ca749de622 (diff)
PR c++/57222
* pt.c (lookup_template_class_1): Handle getting a template template parameter as D1. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch@198749 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/pt.c7
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 89f827214b3..a18a8691b7b 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2013-05-09 Jason Merrill <jason@redhat.com>
+
+ PR c++/57222
+ * pt.c (lookup_template_class_1): Handle getting a template
+ template parameter as D1.
+
2013-05-08 Jason Merrill <jason@redhat.com>
PR c++/57068
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index c087b03140c..980a4d7916a 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -7010,7 +7010,7 @@ maybe_get_template_decl_from_type_decl (tree decl)
? CLASSTYPE_TI_TEMPLATE (TREE_TYPE (decl)) : decl;
}
-/* Given an IDENTIFIER_NODE (type TEMPLATE_DECL) and a chain of
+/* Given an IDENTIFIER_NODE (or type TEMPLATE_DECL) and a chain of
parameters, find the desired type.
D1 is the PTYPENAME terminal, and ARGLIST is the list of arguments.
@@ -7091,6 +7091,11 @@ lookup_template_class_1 (tree d1, tree arglist, tree in_decl, tree context,
d1 = DECL_NAME (templ);
context = DECL_CONTEXT (templ);
}
+ else if (DECL_TEMPLATE_TEMPLATE_PARM_P (d1))
+ {
+ templ = d1;
+ d1 = DECL_NAME (templ);
+ }
/* Issue an error message if we didn't find a template. */
if (! templ)