public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "tromey at sourceware dot org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug c++/26525] DWARF5 class variables are not data members, DW_TAG_member, but DW_TAG_variable. Date: Mon, 24 Aug 2020 19:52:45 +0000 [thread overview] Message-ID: <bug-26525-4717-zpIGJcQadh@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-26525-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=26525 Tom Tromey <tromey at sourceware dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tromey at sourceware dot org --- Comment #1 from Tom Tromey <tromey at sourceware dot org> --- (In reply to Mark Wielaard from comment #0) > FAIL: gdb.base/ptype-offsets.exp: ptype/o static_member The member isn't defined; this works: diff --git a/gdb/testsuite/gdb.base/ptype-offsets.cc b/gdb/testsuite/gdb.base/ptype-offsets.cc index ddb009f1ae5..b686c9bdc3a 100644 --- a/gdb/testsuite/gdb.base/ptype-offsets.cc +++ b/gdb/testsuite/gdb.base/ptype-offsets.cc @@ -185,6 +185,8 @@ struct static_member int abc; }; +static_member static_member::Empty; + int main (int argc, char *argv[]) { > FAIL: gdb.cp/constexpr-field.exp: print y This one is weird, the constexpr fields aren't described in the DWARF. Maybe a test change is needed, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90526#c1 > FAIL: gdb.cp/m-static.exp: static const int initialized nowhere (print field) > FAIL: gdb.cp/m-static.exp: ptype test4.nowhere > FAIL: gdb.cp/m-static.exp: print test4.nowhere.nowhere > FAIL: gdb.cp/m-static.exp: static const int initialized nowhere (whole > struct) > FAIL: gdb.cp/m-static.exp: static const int initialized in class definition > FAIL: gdb.cp/m-static.exp: static const float initialized in class definition > FAIL: gdb.cp/m-static.exp: info variable everywhere The "nowhere" failures are because this member is declared but not defined, and gdb expects it to be <optimized out>. So arguably a compiler perhaps but also just a weird test. I didn't look at the rest. I think the basic feature is probably fine and we're just seeing a difference between the test suite's expectations and what gcc has started doing in some corner cases. -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2020-08-24 19:52 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-08-23 11:13 [Bug c++/26525] New: " mark at klomp dot org 2020-08-24 19:52 ` tromey at sourceware dot org [this message] 2020-08-24 20:04 ` [Bug c++/26525] " tromey at sourceware dot org 2020-08-24 20:22 ` mark at klomp dot org 2020-08-26 14:46 ` tromey at sourceware 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-26525-4717-zpIGJcQadh@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.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).