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

            Bug ID: 94845
           Summary: DWARF function name doesn't match demangled name in
                    base type template parameters
           Product: gcc
           Version: 9.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: robert at ocallahan dot org
  Target Milestone: ---

Example:

template <typename T> void func(T s) {}
int main(void) {
  func<short>(-1);
  return 0;
}

$ g++ -g -o ~/tmp/test ~/tmp/test.cc && objdump -g ~/tmp/test|grep func
    <2a>   DW_AT_name        : (indirect string, offset: 0x0): func<short int>
    <31>   DW_AT_linkage_name: (indirect string, offset: 0x10): _Z4funcIsEvT_
$ c++filt _Z4funcIsEvT_
void func<short>(short)

It's unclear why 'short int' appears instead of just 'short'. It would be
simpler if they were consistent (and, well, shorter). clang++ generates
'short'.

Reply via email to