From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DE5BF3858D33; Thu, 2 Mar 2023 18:19:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DE5BF3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677781144; bh=pGWaZfm9x0aXEaOr9CYFDSwpHdxLSS83wWz50zC3YCw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Y9VkrF/gZ1IUXpuTIQk3y/559jt3f1qyGLqP1gOz/1INwBaExYdbFk7in9dkdFMJb ShjK06VFSO/k/vSQxB15TMxHmzStOdiiGXom1QGovIRp6OxMHJShKtCgI/R+XmBfh7 K85oJHHbiZItBmtvXw/SngxzyhUCNi1cZIa+p5rU= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/108716] [10/11/12/13 Regression] Incorrect DW_AT_decl_{line,column} in DW_TAG_imported_decl Date: Thu, 02 Mar 2023 18:19:04 +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: 13.0 X-Bugzilla-Keywords: wrong-debug X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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=3D108716 --- Comment #2 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:4d82022bfd15d36717bf60a11e75e9ea02204269 commit r13-6419-g4d82022bfd15d36717bf60a11e75e9ea02204269 Author: Jakub Jelinek Date: Thu Mar 2 19:17:52 2023 +0100 c++, debug: Fix up locus of DW_TAG_imported_module [PR108716] Before IMPORTED_DECL has been introduced in PR37410, we used to emit correct DW_AT_decl_line on DW_TAG_imported_module on the testcase below, after = that change we haven't emitted it at all for a while and after some time started emitting incorrect locus, in particular the location of } closi= ng the function. The problem is that while we have correct EXPR_LOCATION on the USING_ST= MT, when genericizing that USING_STMT into IMPORTED_DECL we don't copy the location to DECL_SOURCE_LOCATION, so it gets whatever input_location happens to be when it is created. 2023-03-02 Jakub Jelinek PR debug/108716 * cp-gimplify.cc (cp_genericize_r) : Set DECL_SOURCE_LOCATION on IMPORTED_DECL to expression location of USING_STMT or input_location. * g++.dg/debug/dwarf2/pr108716.C: New test.=