From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 64AF8385F01D; Thu, 2 Apr 2020 08:07:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 64AF8385F01D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1585814837; bh=ERcF15RkY8HZPxzLXxpWN8phYKbIq+kEwspzwEG1Pxo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hylvGEzXDqu0IAofukMWqpnC7GFtTKLDKRv0R8LfnnC2NXpZWnX0vXtkXTaOeWDzm GVMvIU3XXwCKXNhM+fBtJ+h813u7+8SsHpS86tM62wgBCI/zfOvp3Oy6j2eYw0Sgb2 6FzR+bPPdNoFDJS+eTny2i6TiDlGot2bwcuW6UaU= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/94450] lto abstract variable emitted as concrete decl Date: Thu, 02 Apr 2020 08:07:17 +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: 10.0 X-Bugzilla-Keywords: lto 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: cf_reconfirmed_on keywords cc everconfirmed bug_status 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 08:07:17 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94450 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2020-04-02 Keywords| |lto CC| |rguenth at gcc dot gnu.org Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #1 from Richard Biener --- I guess the more correct DWARF would be to have the 13d DIE include DW_AT_declaration? Then we could also stop the "abuse" of DW_AT_abstract_origin and instead have to use DW_AT_specification. But I'm not sure whether DW_AT_specification allows cross CU references (technically yes but practically) especially since there's explicit wording that DW_AT_specifica= tion cannot refer to type unit entities. Note I originally saw all early debug as abstract (but we're not consistent= ly emitting DW_AT_inline to all early function DIEs either) but that concept doesn't apply to globals. As you said the DW_TAG_imported_unit serve no useful purpose (I originally thought that it would provide proper name-lookup scopes but that works correct in other ways). And I'm fine to simply drop those (also given consumers seem to handle references to CUs not explicitely imported just fine). That could be done for GCC 10 already, I fear the rest needs more testing? Btw, thanks for sanity checking the LTO DWARF.=