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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:8960a29b18b830ff0490b7f52051903fba472e45

commit r12-3236-g8960a29b18b830ff0490b7f52051903fba472e45
Author: Jason Merrill <ja...@redhat.com>
Date:   Sun Aug 29 18:17:22 2021 -0400

    c++: limit instantiation with ill-formed class [PR96286]

    I noticed that after the static_assert failures in lwg3466.cc, we got
    various follow-on errors because we went ahead and tried to instantiate the
    promise<T> member functions even after instantiating the class itself ran
    into problems.  Interrupting instantiation of the class itself seems likely
    to cause error-recovery problems, but preventing instantiation of member
    functions seems strictly better for error-recovery.

    This doesn't fix any of the specific testcases in PR96286, but addresses
    part of that problem space.

            PR c++/96286

    gcc/cp/ChangeLog:

            * cp-tree.h (struct lang_type): Add erroneous bit-field.
            (CLASSTYPE_ERRONEOUS): New.
            * pt.c (limit_bad_template_recursion): Check it.
            (instantiate_class_template_1): Set it.

    libstdc++-v3/ChangeLog:

            * testsuite/30_threads/promise/requirements/lwg3466.cc:
            Remove dg-prune-outputs.

    gcc/testsuite/ChangeLog:

            * g++.dg/template/access2.C: Split struct A.

Reply via email to