From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0218D3858D37; Mon, 24 Aug 2020 19:52:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0218D3858D37 From: "tromey at sourceware dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at sourceware dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Aug 2020 19:52:46 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26525 Tom Tromey changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tromey at sourceware dot o= rg --- Comment #1 from Tom Tromey --- (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=3D90526#c1 > FAIL: gdb.cp/m-static.exp: static const int initialized nowhere (print fi= eld) > 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 definiti= on > FAIL: gdb.cp/m-static.exp: static const float initialized in class defini= tion > 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 . So arguably a compiler perhaps b= ut 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 wh= at gcc has started doing in some corner cases. --=20 You are receiving this mail because: You are on the CC list for the bug.=