From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 409633858D1E; Wed, 28 Jun 2023 07:54:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 409633858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687938864; bh=nFFGS041By013IQS4dErR5eruTqebx/TVr71OXLKpnw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jxo9NOonQSIVS70LwOBOxF7cp+fBfMj1+p2v8msM9ZtkJSxiV3OvpfQSGqMXzgjoE GuiKSfX054YEFPI+x5LgMvEEFi2grW3kR0JSsI3Ldzsc5xkYFV9z3P+jLem/u4QIIt UQ451R7ZCq87/veNgtXXKQ8adIu0RTqrUPvVtrL0= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/110439] Missing DW_TAG_typedef for variable with attribute of typedef'd type Date: Wed, 28 Jun 2023 07:54:23 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on everconfirmed Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110439 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2023-06-28 Ever confirmed|0 |1 --- Comment #3 from Richard Biener --- it works fine with foo const attr_foo; where we generate <1><1e>: Abbrev Number: 3 (DW_TAG_typedef) <1f> DW_AT_name : foo <23> DW_AT_decl_file : 1 <24> DW_AT_decl_line : 1 <25> DW_AT_decl_column : 13 <26> DW_AT_type : <0x2f> <1><2a>: Abbrev Number: 4 (DW_TAG_const_type) <2b> DW_AT_type : <0x1e> <1><36>: Abbrev Number: 1 (DW_TAG_variable) <37> DW_AT_name : (indirect string, offset: 0xa): attr_foo <3b> DW_AT_decl_file : 1 <3b> DW_AT_decl_line : 2 <3c> DW_AT_decl_column : 11 <3d> DW_AT_type : <0x2a> <41> DW_AT_external : 1 <41> DW_AT_location : 9 byte block: 3 0 0 0 0 0 0 0 0 (DW_OP_addr= : 0) to GCC the attribute generates a similar type variant but there's no way to emit the "qualification" in dwarf but it looks like for consistency we should then fall back to the typedef DIE, not the base type DIE. Confirmed.=