re PR c++/29080 (Multiple-inheritance with template method function code triggers...
authorMark Mitchell <mark@codesourcery.com>
Mon, 2 Oct 2006 04:12:30 +0000 (04:12 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Mon, 2 Oct 2006 04:12:30 +0000 (04:12 +0000)
PR c++/29080
* parser.c (cp_parser_postfix_dot_deref_expression): Use
BASELINK_ACCESS_BINFO as the qualifying scope when calling
adjust_result_of_qualified_name_lookup.
PR c++/29080
* g++.dg/template/member7.C: New test.

From-SVN: r117360

gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/member7.C [new file with mode: 0644]

index 46bfeb8..d21bf43 100644 (file)
@@ -1,3 +1,15 @@
+2006-10-01  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/29105
+       * pt.c (tsubst_baselink): Substituteinto the qualifying scope.
+       * semantics.c (baselink_for_fns): Build a baselink, even when
+       processing a template.
+
+       PR c++/29080
+       * parser.c (cp_parser_postfix_dot_deref_expression): Use
+       BASELINK_ACCESS_BINFO as the qualifying scope when calling
+       adjust_result_of_qualified_name_lookup. 
+
 2006-09-25  Lee Millward  <lee.millward@codesourcery.com>
 
         PR c++/27329
index 0b7dd3c..7b66ea3 100644 (file)
@@ -4593,7 +4593,7 @@ cp_parser_postfix_dot_deref_expression (cp_parser *parser,
            }
          if (scope && name && BASELINK_P (name))
            adjust_result_of_qualified_name_lookup
-             (name, BINFO_TYPE (BASELINK_BINFO (name)), scope);
+             (name, BINFO_TYPE (BASELINK_ACCESS_BINFO (name)), scope);
          postfix_expression
            = finish_class_member_access_expr (postfix_expression, name,
                                               template_p);
index 51599a7..696d0ab 100644 (file)
@@ -1,3 +1,12 @@
+2006-10-01  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/29105
+       * g++.dg/template/member6.C: New test.
+       * g++.dg/parse/typename7.C: Adjust error markers.
+
+       PR c++/29080
+       * g++.dg/template/member7.C: New test.
+
 2006-09-30  Joseph S. Myers  <joseph@codesourcery.com>
 
        PR c/24010
diff --git a/gcc/testsuite/g++.dg/template/member7.C b/gcc/testsuite/g++.dg/template/member7.C
new file mode 100644 (file)
index 0000000..1c75e49
--- /dev/null
@@ -0,0 +1,15 @@
+// PR c++/29080
+
+struct Base {
+  template<class C> void method() { }
+};
+
+struct Left : public Base { };
+struct Right : public Base { };
+struct Join : public Left, public Right { };
+
+void function()
+{
+  Join join;
+  join.Left::method<int>();
+}