+2018-03-19 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/84812
+ * name-lookup.c (set_local_extern_decl_linkage): Defend against
+ ambiguous lookups.
+
2018-03-16 Jakub Jelinek <jakub@redhat.com>
PR c/84910
= find_namespace_value (current_namespace, DECL_NAME (decl));
loc_value = ns_value;
}
- if (loc_value == error_mark_node)
+ if (loc_value == error_mark_node
+ /* An ambiguous lookup. */
+ || (loc_value && TREE_CODE (loc_value) == TREE_LIST))
loc_value = NULL_TREE;
for (ovl_iterator iter (loc_value); iter; ++iter)
if (ns_value == decl)
ns_value = find_namespace_value (current_namespace, DECL_NAME (decl));
- if (ns_value == error_mark_node)
+ if (ns_value == error_mark_node
+ || (ns_value && TREE_CODE (ns_value) == TREE_LIST))
ns_value = NULL_TREE;
for (ovl_iterator iter (ns_value); iter; ++iter)
+2018-03-19 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/84812
+ * g++.dg/lookup/pr84812.C: New.
+
2018-03-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/84929
--- /dev/null
+// PR 84812. ICE determining implicit "C" linkage
+
+struct A { void foo(); };
+struct B { void foo(); };
+
+struct C : A, B
+{
+ void X ();
+};
+
+void C::X ()
+{
+ void foo (); // local decl of ::foo
+
+ foo ();
+}
+
+// { dg-final { scan-assembler "_Z3foov" } }