commit 670511e83f8bb5df8dd87bfbd3b8a9625ba9963f
Author: Jason Merrill <jason@redhat.com>
Date: Fri Feb 21 15:37:45 2014 -0500
PR c++/60108
* semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
@@ -3986,7 +3986,7 @@ expand_or_defer_fn_1 (tree fn)
linkage of all functions, and as that causes writes to
the data mapped in from the PCH file, it's advantageous
to mark the functions at this point. */
- if (!DECL_IMPLICIT_INSTANTIATION (fn))
+ if (!DECL_IMPLICIT_INSTANTIATION (fn) || DECL_DEFAULTED_FN (fn))
{
/* This function must have external linkage, as
otherwise DECL_INTERFACE_KNOWN would have been
new file mode 100644
@@ -0,0 +1,17 @@
+// PR c++/60108
+// { dg-require-effective-target c++11 }
+
+template<int> struct A
+{
+ virtual ~A();
+};
+
+template<typename> struct B : A<0>, A<1>
+{
+ ~B() = default;
+};
+
+struct C : B<bool>
+{
+ C() {}
+};