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

--- Comment #14 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Jakub Jelinek
<[email protected]>:

https://gcc.gnu.org/g:a319d9ff7044114afae3c04f9999f8a067a37a7e

commit r15-11215-ga319d9ff7044114afae3c04f9999f8a067a37a7e
Author: Jakub Jelinek <[email protected]>
Date:   Tue Apr 7 18:00:24 2026 +0200

    c++: Implement mangling for partially instantiated C++26 pack indexing
[PR124487]

    On Fri, Apr 03, 2026 at 05:56:08PM -0400, Jason Merrill wrote:
    > Regarding the TODO, the related case I was thinking about was
    >
    > >   ::= sZ <template-param>     # sizeof...(T), size of a template
parameter pack
    > >   ::= sP <template-arg>* E    # sizeof...(T), size of a captured
template parameter pack from an alias template
    >
    > ...but rather than follow the precedent of a different two-letter
    > abbreviation, I might use J...E to express the expanded pack, as in
    > <template-arg>.  I've now suggested that on the ABI issue, as well.

    Here is a patch which implements it.

    2026-04-07  Jakub Jelinek  <[email protected]>

            PR c++/124487
            * mangle.cc (write_type) <case PACK_INDEX_TYPE>: Handle even
            the case of partially substituted pack.
            (write_expression): Similarly for PACK_INDEX_EXPR.

            * g++.dg/cpp26/pack-indexing9.C: Remove dg-sorry/dg-bogus, add
            tests for mangled names and further test coverage.

    Reviewed-by: Jason Merrill <[email protected]>
    (cherry picked from commit 1933adbc5446e5ae0282585498ac5f9f8e6c0bdc)

Reply via email to