diff options
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/pt.c | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a1104b4..ed94e06 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2011-07-05 Jason Merrill <jason@redhat.com> + PR c++/48157 + * pt.c (tsubst_qualified_id): Preserve TEMPLATE_ID_EXPR in + partial instantiation. + PR c++/49598 * semantics.c (finish_id_expression): convert_from_reference. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index e7be08b..17ca44c 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -11287,8 +11287,12 @@ tsubst_qualified_id (tree qualified_id, tree args, expr = name; if (dependent_scope_p (scope)) - return build_qualified_name (NULL_TREE, scope, expr, - QUALIFIED_NAME_IS_TEMPLATE (qualified_id)); + { + if (is_template) + expr = build_min_nt (TEMPLATE_ID_EXPR, expr, template_args); + return build_qualified_name (NULL_TREE, scope, expr, + QUALIFIED_NAME_IS_TEMPLATE (qualified_id)); + } if (!BASELINK_P (name) && !DECL_P (expr)) { |