+2012-01-13 Jason Merrill <jason@redhat.com>
+
+ PR c++/51620
+ * class.c (build_vtbl_initializer): Use __cxa_deleted_virtual.
+
2012-01-12 Jason Merrill <jason@redhat.com>
PR c++/51714
init = abort_fndecl_addr;
}
}
+ /* Likewise for deleted virtuals. */
+ else if (DECL_DELETED_FN (fn_original))
+ {
+ fn = get_identifier ("__cxa_deleted_virtual");
+ if (!get_global_value_if_present (fn, &fn))
+ fn = push_library_fn (fn, (build_function_type_list
+ (void_type_node, NULL_TREE)),
+ NULL_TREE);
+ if (!TARGET_VTABLE_USES_DESCRIPTORS)
+ init = fold_convert (vfunc_ptr_type_node,
+ build_fold_addr_expr (fn));
+ }
else
{
if (!integer_zerop (delta) || vcall_index)
+2012-01-13 Jason Merrill <jason@redhat.com>
+
+ PR c++/51620
+ * g++.dg/cpp0x/defaulted34.C: New.
+ * g++.dg/template/virtual3.C: New.
+
2012-01-13 Richard Guenther <rguenther@suse.de>
PR middle-end/8081
--- /dev/null
+// PR c++/51620
+
+template<int> class A
+{
+ virtual ~A(); // { dg-error "non-deleted|private" }
+};
+
+struct B : A<0>, A<1> // { dg-error "deleted|context" }
+{
+ B() {} // { dg-error "context" }
+};