2011-11-07 Paolo Carlini <paolo.carlini@oracle.com>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 Nov 2011 22:03:27 +0000 (22:03 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 Nov 2011 22:03:27 +0000 (22:03 +0000)
* 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
gcc/cp/pt.c

index 72aa051..f75fcc2 100644 (file)
@@ -1,3 +1,8 @@
+2011-11-07  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * pt.c (tsubst_copy_and_build): Fix qualified_name_lookup_error
+       call in case COMPONENT_REF.
+
 2011-11-07  Jason Merrill  <jason@redhat.com>
            Dodji Seketeli  <dodji@redhat.com>
 
index c8c8d91..c4f4a94 100644 (file)
@@ -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;
              }