public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "tromey at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/45088] New: pointer type information lost in debuginfo Date: Mon, 26 Jul 2010 19:25:00 -0000 [thread overview] Message-ID: <bug-45088-360@http.gcc.gnu.org/bugzilla/> (raw) 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
next reply other threads:[~2010-07-26 19:25 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-07-26 19:25 tromey at gcc dot gnu dot org [this message] 2010-07-27 8:29 ` [Bug debug/45088] " jakub at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-45088-360@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).