http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49408

           Summary: member function template id not matching linkage name
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: jan.kratoch...@redhat.com
                CC: do...@gcc.gnu.org
            Target: x86_64-unknown-linux-gnu


FAIL gcc (GCC) 4.4.7 20110614 (prerelease)
FAIL gcc (GCC) 4.7.0 20110614 (experimental)

struct S {
  void m (int x) {}
};
template<void (S::*F) (int)>
struct K {
  void f () { S s; (s.*F) (5); }
};
int main () {
  K<&S::m> k;
  k.f ();
}

-g

 <1><64>: Abbrev Number: 8 (DW_TAG_structure_type)
    <65>   DW_AT_name        : K<&S::m>        
 <2><8a>: Abbrev Number: 10 (DW_TAG_template_value_param)
    <8b>   DW_AT_name        : F        
    <8d>   DW_AT_type        : <0x170>  
 <2><70>: Abbrev Number: 9 (DW_TAG_subprogram)
    <72>   DW_AT_name        : f        
    <76>   DW_AT_MIPS_linkage_name: _ZN1KIXadL_ZN1S1mEiEEE1fEv  
 <1><11d>: Abbrev Number: 18 (DW_TAG_subprogram)
    <11e>   DW_AT_specification: <0x70> 
    <122>   DW_AT_low_pc      : 0x4004de        
00000000004004de W _ZN1KIXadL_ZN1S1mEiEEE1fEv
00000000004004de W K<&(S::m(int))>::f()

The linkage name has class name: K<&(S::m(int))>
But DW_AT_name of that class is: K<&S::m>

It is not ambiguous but it breaks debugger lookups.

Reply via email to