https://sourceware.org/bugzilla/show_bug.cgi?id=32408

            Bug ID: 32408
           Summary: C++filt fails to demangle some gcc-generated template
                    mangled names
           Product: binutils
           Version: 2.42
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: ofekshilon at gmail dot com
  Target Milestone: ---

`fun` from this c++ snippet:
```
#include <cstdio>
#include <concepts>

template <std::integral I>
void fun(I i)
{
    std::puts("foo<std::integral>()");
}
```

is mangled by gcc to `_Z3funITkSt8integralcEvT_`, and c++filt fails to demangle
it:

   $ c++filt _Z3funITkSt8integralcEvT_
   _Z3funITkSt8integralcEvT_


godbolt link: https://godbolt.org/z/hcdh67Y5x


BTW when such a template is a specialization of a more general one, the mangled
name has an additional suffix (but c++filt still fails to demangle it). Here:
https://godbolt.org/z/4jMKqjcnc , the mangled name is
_Z3funITkSt8integralcEvT_.isra.0

Raised by @SirWalrus on the compiler-explorer discord:
https://discord.com/channels/763778740345765900/764131312117743656/1312754780875128872

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to