+2018-03-21 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/84836
+ * name-lookup.c (update_binding): Correct logic for local binding
+ update.
+
2018-03-21 Marek Polacek <polacek@redhat.com>
PR c++/71638, ICE with NSDMI and reference.
done:
if (to_val)
{
- if (level->kind != sk_namespace
- && !to_type && binding->value && OVL_P (to_val))
- update_local_overload (binding, to_val);
+ if (level->kind == sk_namespace || to_type == decl || to_val == decl)
+ add_decl_to_level (level, decl);
else
{
- tree to_add = to_val;
-
- if (level->kind == sk_namespace)
- to_add = decl;
- else if (to_type == decl)
- to_add = decl;
- else if (TREE_CODE (to_add) == OVERLOAD)
- to_add = build_tree_list (NULL_TREE, to_add);
-
- add_decl_to_level (level, to_add);
+ gcc_checking_assert (binding->value && OVL_P (binding->value));
+ update_local_overload (binding, to_val);
}
if (slot)
+2018-03-21 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/84836
+ * g++.dg/lookup/pr84836.C: New.
+
2018-03-21 Bin Cheng <bin.cheng@arm.com>
PR tree-optimization/84969