From 665e3b214d89d7938a48f94e8e7fe71b749544b8 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Mon, 6 Jan 2020 20:07:59 -0500 Subject: PR c++/92552 - ICE with inherited constrained default ctor. We set TYPE_HAS_USER_CONSTRUCTOR on the template type in lookup_using_decl, but we didn't copy it to the instantiation. Setting it in one_inherited_ctor is too late, as that gets called after we decide whether to set CLASSTYPE_LAZY_DEFAULT_CTOR. This change affects other testcases as well; the changes are fixes for the other inherited constructor tests as well. * pt.c (instantiate_class_template_1): Copy TYPE_HAS_USER_CONSTRUCTOR. * class.c (one_inherited_ctor): Don't set it here. From-SVN: r279936 --- gcc/cp/class.c | 1 - 1 file changed, 1 deletion(-) (limited to 'gcc/cp/class.c') diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 4da0881..07abe52 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -3141,7 +3141,6 @@ one_inherited_ctor (tree ctor, tree t, tree using_decl) ctor = implicitly_declare_fn (sfk_inheriting_constructor, t, /*const*/false, ctor, parms); add_method (t, ctor, using_decl != NULL_TREE); - TYPE_HAS_USER_CONSTRUCTOR (t) = true; return; } -- cgit v1.1