[Bug c++/124487] mangling type pack index

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Apr 4 09:19:02 GMT 2026


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

--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:969f4493630adac2ce35ad8a3e105323dc4c0016

commit r16-8462-g969f4493630adac2ce35ad8a3e105323dc4c0016
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Sat Apr 4 11:18:20 2026 +0200

    c++: Partially implement mangling for C++26 pack indexing [PR124487]

    I still haven't figured out how to correctly mangle the case
    in pack-indexing9.C where write_type is called with PACK_INDEX_TYPE
    where PACK_INDEX_PACK is TREE_VEC of types, i.e. already expanded pack,
    but given that right now we sorry on mangling of all PACK_INDEX_TYPE
    or PACK_INDEX_EXPR trees, I think the following patch is an incremental
    progress in the right direction and just mangles what is clearly specified
    in the proposal.

    This patch relies on the PR124198 patch I've just posted, because the
    casts to size_t change mangling of pack...[1] from having i1 in it
    to m1 (on x86_64, j1 on ia32, ...).

    2026-04-04  Jakub Jelinek  <jakub@redhat.com>

            PR c++/124487
            * mangle.cc (write_type) <case PACK_INDEX_TYPE>: Handle pack index
            mangling unless (for now) PACK_INDEX_PACK is a TREE_VEC.
            (write_expression): Handle PACK_INDEX_EXPR.

            * g++.dg/cpp26/pack-indexing7.C: Don't xfail dg-bogus.
            * g++.dg/cpp26/pack-indexing22.C: New test.


More information about the Gcc-bugs mailing list