PR c++/92552 - ICE with inherited constrained default ctor.
authorJason Merrill <jason@redhat.com>
Tue, 7 Jan 2020 01:07:59 +0000 (20:07 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 7 Jan 2020 01:07:59 +0000 (20:07 -0500)
commit665e3b214d89d7938a48f94e8e7fe71b749544b8
tree8c823b462818f7a0beb5ae5c598d4413d48ec2b6
parente4bcf1f5497188d0ca6c4128767dcd0d5953914d
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/ChangeLog
gcc/cp/class.c
gcc/cp/pt.c
gcc/testsuite/g++.dg/concepts/inherit-ctor3.C
gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor2.C
gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor7.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/crash7.C
gcc/testsuite/g++.old-deja/g++.pt/error2.C