OSDN Git Service

2011-10-28 Paolo Carlini <paolo.carlini@oracle.com>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 29 Oct 2011 00:06:34 +0000 (00:06 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 29 Oct 2011 00:06:34 +0000 (00:06 +0000)
Revert Fix for c++/50864.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180640 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/pt.c

index bd95096..d057776 100644 (file)
@@ -13741,12 +13741,14 @@ tsubst_copy_and_build (tree t,
        else if (TREE_CODE (member) == SCOPE_REF
                 && TREE_CODE (TREE_OPERAND (member, 1)) == TEMPLATE_ID_EXPR)
          {
        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.  */
            /* Lookup the template functions now that we know what the
               scope is.  */
-           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,
+           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,
                                            /*is_type_p=*/false,
                                            /*complain=*/false);
            if (BASELINK_P (member))
                                            /*is_type_p=*/false,
                                            /*complain=*/false);
            if (BASELINK_P (member))
@@ -13760,7 +13762,7 @@ tsubst_copy_and_build (tree t,
              }
            else
              {
              }
            else
              {
-               qualified_name_lookup_error (scope, tmpl, member,
+               qualified_name_lookup_error (object_type, tmpl, member,
                                             input_location);
                return error_mark_node;
              }
                                             input_location);
                return error_mark_node;
              }