This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/51668] New: class DW_AT_name does not match method's linkage name prefix (char)1 vs. '\001'
- From: "jan.kratochvil at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 23 Dec 2011 17:41:46 +0000
- Subject: [Bug debug/51668] New: class DW_AT_name does not match method's linkage name prefix (char)1 vs. '\001'
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51668
Bug #: 51668
Summary: class DW_AT_name does not match method's linkage name
prefix (char)1 vs. '\001'
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: jan.kratochvil@redhat.com
CC: dodji@gcc.gnu.org
Target: x86_64-unknown-linux-gnu
PASS: gcc (GCC) 4.6.3 20111222 (prerelease)
FAIL: gcc (GCC) 4.7.0 20111222 (experimental)
>From the GDB point of view it is a regression because gcc-4.7 now provides the
non-matching DW_AT_linkage_name for ctors/dtors which GDB prefers over its
physname computed from class's DW_AT_name.
template<char c>
class C {
public:
void m () {}
~C() {}
};
typedef C<1> D;
D d;
int main () { d.m (); }
nm:
0000000000400604 W _ZN1CILc1EED1Ev
0000000000400604 W _ZN1CILc1EED2Ev
nm -C:
0000000000400604 W C<(char)1>::~C()
0000000000400604 W C<(char)1>::~C()
readelf -wi:
<1><3a>: Abbrev Number: 3 (DW_TAG_class_type)
<3b> DW_AT_name : (indirect string, offset: 0xac): C<'\001'>
The gcc-4.6 -> gcc-4.7 regression:
-PASS: gdb.cp/templates.exp: print destructor of template typedef
+FAIL: gdb.cp/templates.exp: print destructor of template typedef
(gdb) p D::~C
$1 = {void (C<(char)'\001'> * const)} 0x40056e <C<(char)'\001'>::~C()>
->
There is no field named ~C