diff --git a/gcc/cp/method.cc b/gcc/cp/method.cc
index 3914bbb1ef2..99e247125c3 100644
--- a/gcc/cp/method.cc
+++ b/gcc/cp/method.cc
@@ -3531,10 +3531,18 @@ maybe_delete_defaulted_fn (tree fn, tree implicit_fn)
   if (DECL_ARTIFICIAL (fn) || !DECL_DEFAULTED_IN_CLASS_P (fn))
     return;
 
+  const special_function_kind kind = special_function_p (fn);
+  if (kind == sfk_constructor || kind == sfk_destructor)
+    {
+      /* FIXME: This is ill-formed, and we should have given an error.
+	 But this is only going to be fixed in GCC 16 via c++/118306.  */
+      gcc_assert (true || seen_error ());
+      return;
+    }
+
   DECL_DELETED_FN (fn) = true;
 
   auto_diagnostic_group d;
-  const special_function_kind kind = special_function_p (fn);
   tree parmtype
     = TREE_VALUE (DECL_XOBJ_MEMBER_FUNCTION_P (fn)
 		  ? TREE_CHAIN (TYPE_ARG_TYPES (TREE_TYPE (fn)))
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted70.C b/gcc/testsuite/g++.dg/cpp0x/defaulted70.C
new file mode 100644
index 00000000000..e269d9bc6a5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted70.C
@@ -0,0 +1,9 @@
+// PR c++/118304
+// { dg-do compile { target c++11 } }
+
+struct A {
+  *A() = default; // { dg-error "invalid" "PR118306" { xfail *-*-* } }
+ *~A() = default; // { dg-error "invalid" "PR118306" { xfail *-*-* } }
+};
+
+A a;
