+2016-09-22 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/71979
+ * class.c (build_base_path): Allow for lookup_base returning
+ NULL_TREE.
+
2016-09-21 Jason Merrill <jason@redhat.com>
Core 903
/* This can happen when adjust_result_of_qualified_name_lookup can't
find a unique base binfo in a call to a member function. We
couldn't give the diagnostic then since we might have been calling
- a static member function, so we do it now. */
+ a static member function, so we do it now. In other cases, eg.
+ during error recovery (c++/71979), we may not have a base at all. */
if (complain & tf_error)
{
tree base = lookup_base (probe, BINFO_TYPE (d_binfo),
ba_unique, NULL, complain);
- gcc_assert (base == error_mark_node);
+ gcc_assert (base == error_mark_node || !base);
}
return error_mark_node;
}
+2016-09-22 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/71979
+ * g++.dg/cpp0x/pr71979.C: New.
+
2016-09-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
* g++.dg/pr77550.C: Use __SIZE_TYPE__.
--- /dev/null
+// PR c++/71979
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ A & operator= (A &);
+};
+
+struct B : A {}; // { dg-error "cannot bind" }
+
+void foo ()
+{
+ B b;
+ b = B (); // { dg-error "use of deleted" }
+}