https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91930

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Mon Oct 14 20:13:49 2019
New Revision: 276968

URL: https://gcc.gnu.org/viewcvs?rev=276968&root=gcc&view=rev
Log:
        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.

Added:
    trunk/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor6.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/name-lookup.c
    trunk/gcc/testsuite/g++.dg/cpp0x/inh-ctor5.C
    trunk/gcc/testsuite/g++.dg/cpp1z/inh-ctor22.C

Reply via email to