[Bug c++/105652] [12/13 Regression] ICE: in is_base_type, at dwarf2out.cc:13400 since r12-1937-gc28e1d288ab727de

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue May 31 19:32:00 GMT 2022


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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:

https://gcc.gnu.org/g:102a1472ab393c89bd74c06ff92bef55fa61812c

commit r12-8443-g102a1472ab393c89bd74c06ff92bef55fa61812c
Author: Jason Merrill <jason@redhat.com>
Date:   Thu May 26 22:43:05 2022 -0400

    c++: lambda in concept [PR105652]

    We currently check satisfaction in the context of the constrained
    declaration (which may be wrong, see PR104111).  When checking C<int>
    for S<int>, we currently substitute into the lambda in the context of
    S<T> (rather than S<int>, which seems wrong if the above isn't wrong), so
    the new closure type thinks its context is S<T>, which confuses debug
    output.  For the moment, let's work around all of this by overriding the
    context of the closure.

            PR c++/105652

    gcc/cp/ChangeLog:

            * pt.cc (tsubst_lambda_expr): Don't let a namespace-scope lambda
            instantiate into a class-scope lambda.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp2a/concepts-lambda20.C: New test.


More information about the Gcc-bugs mailing list