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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Patrick Palka
<ppa...@gcc.gnu.org>:

https://gcc.gnu.org/g:2400f81c2c2489f4b6fbb245ef946a39be40defd

commit r10-9734-g2400f81c2c2489f4b6fbb245ef946a39be40defd
Author: Patrick Palka <ppa...@redhat.com>
Date:   Tue Apr 20 12:06:27 2021 -0400

    c++: Fix tsubsting CLASS_PLACEHOLDER_TEMPLATE [PR95434]

    Here, during partial instantiation of the generic lambda, we do
    tsubst_copy on the CLASS_PLACEHOLDER_TEMPLATE for U{0} which yields a
    (level-lowered) TEMPLATE_TEMPLATE_PARM rather than the corresponding
    TEMPLATE_DECL.  This later confuses do_class_deduction which expects
    that a CLASS_PLACEHOLDER_TEMPLATE is always a TEMPLATE_DECL.

    gcc/cp/ChangeLog:

            PR c++/95434
            * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: If tsubsting
            CLASS_PLACEHOLDER_TEMPLATE yields a TEMPLATE_TEMPLATE_PARM,
            adjust to its TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.

    gcc/testsuite/ChangeLog:

            PR c++/95434
            * g++.dg/cpp2a/lambda-generic9.C: New test.

    (cherry picked from commit cafcfcb5840b62d9fc80c12192189351e995a4f2)
  • [Bug c++/95434] ICE for CTAD in... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to