]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR c++/91930 - ICE with constrained inherited default ctor.
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 14 Oct 2019 20:13:49 +0000 (20:13 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 14 Oct 2019 20:13:49 +0000 (20:13 +0000)
commitaa45db50a034b266c338b55dee1b412178ea84a7
tree21516f4b635028cee88b7647e3697a39de8158b2
parenta8bf45f436ead5d31db39e9a9578429524d70a2f
PR c++/91930 - ICE with constrained inherited default ctor.

The testcase was crashing because lazily_declare_fn was failing to add a
defaulted constructor, because the implicit declaration was less constrained
than the inherited default constructor.  But when we have an inherited
constructor, we shouldn't be trying to declare a default constructor in the
first place, because it counts as "a user-declared constructor".  With that
fixed I needed to adjust a couple of inherited constructor testcases that
previously had been diagnosing the default constructor as deleted rather
than not declared.

* name-lookup.c (do_class_using_decl): Set TYPE_HAS_USER_CONSTRUCTOR
for inherited constructor.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@276968 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/name-lookup.c
gcc/testsuite/g++.dg/cpp0x/inh-ctor5.C
gcc/testsuite/g++.dg/cpp1z/inh-ctor22.C
gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor6.C [new file with mode: 0644]