summaryrefslogtreecommitdiffstats
path: root/gcc/cp/search.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/search.c')
-rw-r--r--gcc/cp/search.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/search.c b/gcc/cp/search.c
index 8d5ae655cea..a0cb0ff0bc1 100644
--- a/gcc/cp/search.c
+++ b/gcc/cp/search.c
@@ -1367,6 +1367,12 @@ lookup_fnfields_1 (tree type, tree name)
else if (name == ansi_assopname(NOP_EXPR)
&& CLASSTYPE_LAZY_ASSIGNMENT_OP (type))
lazily_declare_fn (sfk_assignment_operator, type);
+ else if ((name == dtor_identifier
+ || name == base_dtor_identifier
+ || name == complete_dtor_identifier
+ || name == deleting_dtor_identifier)
+ && CLASSTYPE_LAZY_DESTRUCTOR (type))
+ lazily_declare_fn (sfk_destructor, type);
}
method_vec = CLASSTYPE_METHOD_VEC (type);
OpenPOWER on IntegriCloud