gcc/cp/ChangeLog:
PR c++/70205
* search.c (adjust_result_of_qualified_name_lookup): Don't
update the BASELINK_BINFO of DECL if the second call
to lookup_base fails.
gcc/testsuite/ChangeLog:
PR c++/70205
* g++.dg/lookup/pr70205.C: New test.
From-SVN: r234317
+2016-03-18 Patrick Palka <ppalka@gcc.gnu.org>
+
+ PR c++/70205
+ * search.c (adjust_result_of_qualified_name_lookup): Don't
+ update the BASELINK_BINFO of DECL if the second call
+ to lookup_base fails.
+
2016-03-18 Patrick Palka <ppalka@gcc.gnu.org>
PR c++/70218
if (base && base != error_mark_node)
{
BASELINK_ACCESS_BINFO (decl) = base;
- BASELINK_BINFO (decl)
+ tree decl_binfo
= lookup_base (base, BINFO_TYPE (BASELINK_BINFO (decl)),
ba_unique, NULL, tf_none);
+ if (decl_binfo && decl_binfo != error_mark_node)
+ BASELINK_BINFO (decl) = decl_binfo;
}
}
+2016-03-18 Patrick Palka <ppalka@gcc.gnu.org>
+
+ PR c++/70205
+ * g++.dg/lookup/pr70205.C: New test.
+
2016-03-18 Patrick Palka <ppalka@gcc.gnu.org>
PR c++/70218
--- /dev/null
+// PR c++/70205
+
+struct A
+{
+protected:
+ static void f ();
+};
+struct B : A { };
+struct C : A { };
+struct D : C, B { void a () { D::f (); } };
+struct E : D { void b () { D::f (); } };