From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26639 invoked by alias); 26 Jul 2010 19:25:14 -0000 Received: (qmail 26338 invoked by uid 48); 26 Jul 2010 19:24:42 -0000 Date: Mon, 26 Jul 2010 19:25:00 -0000 Subject: [Bug debug/45088] New: pointer type information lost in debuginfo X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "tromey at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-07/txt/msg02903.txt.bz2 I'm using r162345 on x86 Fedora 13. This test case comes from the gdb test suite. struct A { virtual ~A (); int a1; }; A::~A() { a1 = 800; } struct B : public A { virtual ~B (); int b1; int b2; }; B::~B() { a1 = 900; b1 = 901; b2 = 902; } struct C : public B { A *c1; A *c2; }; // Stop the compiler from optimizing away data. void refer (A *) { ; } struct empty {}; // Stop the compiler from optimizing away data. void refer (empty *) { ; } int main (void) { A alpha, *aap, *abp, *acp; B beta, *bbp; C gamma; empty e; alpha.a1 = 100; beta.a1 = 200; beta.b1 = 201; beta.b2 = 202; gamma.c1 = 0; gamma.c2 = (A *) ~0UL; aap = α refer (aap); abp = β refer (abp); bbp = β refer (bbp); acp = γ refer (acp); refer (&e); return 0; // marker return 0 } // marker close brace When I compile this I see that the type of the "c1" field is bad: <2><48>: Abbrev Number: 5 (DW_TAG_member) <49> DW_AT_name : c1 <4c> DW_AT_decl_file : 1 <4d> DW_AT_decl_line : 46 <4e> DW_AT_type : <0x116> <52> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) [...] <1><116>: Abbrev Number: 11 (DW_TAG_pointer_type) <117> DW_AT_byte_size : 4 That is, gcc claims that this field is a "void *", which is not the case. -- Summary: pointer type information lost in debuginfo Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tromey at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45088