2017-05-29 Nathan Sidwell <nathan@acm.org>
+ PR c++/80891 (#4)
+ * ptree.c (cxx_print_xnode): Show internal OVERLOAD structure.
+ * tree.c (ovl_insert, ovl_iterator_remove_node): Fix copying assert.
+
Stat hack representation
* name-lookup.c (STAT_HACK_P, STAT_TYPE, STAT_DECL,
MAYBE_STAT_DECL, MAYBE_STAT_TYPE): New.
indent + 4);
break;
case OVERLOAD:
- print_node (file, "name", OVL_NAME (node), indent+4);
- for (ovl_iterator iter (node, true); iter; ++iter)
- print_node (file,
- TREE_CODE (*iter) == OVERLOAD ? "inner" : "function",
- *iter, indent+4);
+ print_node (file, "function", OVL_FUNCTION (node), indent+4);
+ print_node (file, "next", OVL_CHAIN (node), indent+4);
break;
case TEMPLATE_PARM_INDEX:
print_node (file, "decl", TEMPLATE_PARM_DECL (node), indent+4);
| (OVL_USING_P (maybe_ovl) << 0))))
{
gcc_checking_assert (!OVL_LOOKUP_P (maybe_ovl)
- && (!OVL_USED_P (maybe_ovl) || !copying));
+ && (!copying || OVL_USED_P (maybe_ovl)));
if (OVL_USED_P (maybe_ovl))
{
copying = true;
{
tree probe = *slot;
gcc_checking_assert (!OVL_LOOKUP_P (probe)
- && (!OVL_USED_P (probe) || !copying));
+ && (!copying || OVL_USED_P (probe)));
if (OVL_USED_P (probe))
{
copying = true;
2017-05-29 Nathan Sidwell <nathan@acm.org>
+ PR c++/80891 (#4)
+ * g++.dg/lookup/pr80891-4.C: New.
+
PR c++/80891 (#1)
* g++.dg/lookup/pr80891-1.C: New.
--- /dev/null
+// PR c++/80891 part 4
+// Inserting into an immutable overload set
+
+namespace tuples {
+template <class, class> void get();
+template <int> void get();
+}
+using tuples::get;
+template <class RandomAccessIterator> void make_iterator_vertex_map() {
+ RandomAccessIterator a;
+ a, get;
+}
+template <class> void get();