From 7f1a402826adc56c68fe91e628b2dcf0b10724c4 Mon Sep 17 00:00:00 2001 From: paolo Date: Mon, 7 Nov 2011 22:03:27 +0000 Subject: [PATCH] 2011-11-07 Paolo Carlini * pt.c (tsubst_copy_and_build): Fix qualified_name_lookup_error call in case COMPONENT_REF. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181124 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/pt.c | 12 +++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 72aa051..f75fcc2 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2011-11-07 Paolo Carlini + + * pt.c (tsubst_copy_and_build): Fix qualified_name_lookup_error + call in case COMPONENT_REF. + 2011-11-07 Jason Merrill Dodji Seketeli diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index c8c8d91..c4f4a94 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -13894,14 +13894,12 @@ tsubst_copy_and_build (tree t, else if (TREE_CODE (member) == SCOPE_REF && TREE_CODE (TREE_OPERAND (member, 1)) == TEMPLATE_ID_EXPR) { - tree tmpl; - tree args; - /* Lookup the template functions now that we know what the scope is. */ - tmpl = TREE_OPERAND (TREE_OPERAND (member, 1), 0); - args = TREE_OPERAND (TREE_OPERAND (member, 1), 1); - member = lookup_qualified_name (TREE_OPERAND (member, 0), tmpl, + tree scope = TREE_OPERAND (member, 0); + tree tmpl = TREE_OPERAND (TREE_OPERAND (member, 1), 0); + tree args = TREE_OPERAND (TREE_OPERAND (member, 1), 1); + member = lookup_qualified_name (scope, tmpl, /*is_type_p=*/false, /*complain=*/false); if (BASELINK_P (member)) @@ -13915,7 +13913,7 @@ tsubst_copy_and_build (tree t, } else { - qualified_name_lookup_error (object_type, tmpl, member, + qualified_name_lookup_error (scope, tmpl, member, input_location); return error_mark_node; } -- 2.7.4