From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B7FD03817761; Wed, 3 May 2023 15:22:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B7FD03817761 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683127321; bh=4zp/OidzFWZZdvCpUS8PfZPhZDOaXu+aiUITaT22R4k=; h=From:To:Subject:Date:In-Reply-To:References:From; b=HIZC9FccnziLx+PFulOzxrROvD1q5WML8X1CyN9X/EgcT0Wj341SMzjeFvaZH710r BuFYEsEaw+KVoA/CF/1j3B1IxY+NLoWCR18eCRm9LFvjT82Yf6nhSe0W7yH3O5qUan DY3tCigcASV5C6ip1lhxCdt3S1s3L2Oblkv4P44k= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/108716] [10 Regression] Incorrect DW_AT_decl_{line,column} in DW_TAG_imported_decl Date: Wed, 03 May 2023 15:22:01 +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 #8 from CVS Commits --- The releases/gcc-10 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:17ea4d1f5d3609ef2540a10c29f57c0bd185ba4b commit r10-11371-g17ea4d1f5d3609ef2540a10c29f57c0bd185ba4b 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.c (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. (cherry picked from commit 4d82022bfd15d36717bf60a11e75e9ea02204269)=