From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 596A238708E2; Tue, 2 May 2023 20:15:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 596A238708E2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683058517; bh=pdpmu6maVzL6rWqRhbzz6TxPtWva6hh5r7hiX3Ftn0I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=JcaVfMYQq+3KY+behpnKixmEPgDiB4kkZTnDQ3TYzbXps2LmJa/EFocQAreFZVzy4 pSG+ngX3xo9Ny7glT2rqeYAWW0AkIJZ47mjhlpN1h0KS88yeGgLaiuXlDJ8leBisIm Tdk1oUW6tJnl/RKV1v4/1y6dKy8vSWSso69b8Cp8= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/108716] [10/11 Regression] Incorrect DW_AT_decl_{line,column} in DW_TAG_imported_decl Date: Tue, 02 May 2023 20:15: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: 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 #6 from CVS Commits --- The releases/gcc-11 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:2a6b112404837a3119985b58b886f63a88ec2cab commit r11-10718-g2a6b112404837a3119985b58b886f63a88ec2cab 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)=