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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
--- gcc/cp/mangle.cc.jj 2026-03-09 10:05:44.653968731 +0100
+++ gcc/cp/mangle.cc    2026-03-13 16:15:44.546198337 +0100
@@ -2744,9 +2744,9 @@ write_type (tree type)
              break;

            case PACK_INDEX_TYPE:
-             /* TODO Mangle pack indexing
-                <https://github.com/itanium-cxx-abi/cxx-abi/issues/175>.  */
-             sorry ("mangling type pack index");
+             write_string ("Dy");
+             write_type (PACK_INDEX_PACK (type));
+             write_expression (PACK_INDEX_INDEX (type));
              break;

            case LANG_TYPE:
@@ -3602,6 +3602,13 @@ write_expression (tree expr)
       else
        goto normal_expr;
     }
+  else if (code == PACK_INDEX_EXPR)
+    {
+      /* sy rather than sysp.  */
+      write_string ("sy");
+      write_expression (PACK_EXPANSION_PATTERN (TREE_OPERAND (expr, 0)));
+      write_expression (TREE_OPERAND (expr, 1));
+    }
   else if (TREE_CODE (expr) == ALIGNOF_EXPR)
     {
       if (!ALIGNOF_EXPR_STD_P (expr))
+ demangler + testsuite?  The baz case doesn't work (but it doesn't work in the
2025-ish clang patch either.  And clang trunk still doesn't have it.

Reply via email to