* [Bug debug/108716] [10/11/12/13 Regression] Incorrect DW_AT_decl_{line,column} in DW_TAG_imported_decl
2023-02-08 10:47 [Bug debug/108716] New: [10/11/12/13 Regression] Incorrect DW_AT_decl_{line,column} in DW_TAG_imported_decl jakub at gcc dot gnu.org
@ 2023-02-08 10:47 ` jakub at gcc dot gnu.org
2023-02-08 10:53 ` jakub at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-02-08 10:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108716
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2023-02-08
Target Milestone|--- |10.5
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Priority|P3 |P2
Keywords| |wrong-debug
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug debug/108716] [10/11/12/13 Regression] Incorrect DW_AT_decl_{line,column} in DW_TAG_imported_decl
2023-02-08 10:47 [Bug debug/108716] New: [10/11/12/13 Regression] Incorrect DW_AT_decl_{line,column} in DW_TAG_imported_decl jakub at gcc dot gnu.org
2023-02-08 10:47 ` [Bug debug/108716] " jakub at gcc dot gnu.org
@ 2023-02-08 10:53 ` jakub at gcc dot gnu.org
2023-03-02 18:19 ` cvs-commit at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-02-08 10:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108716
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 54431
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54431&action=edit
gcc13-pr108716.patch
Untested fix.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug debug/108716] [10/11/12/13 Regression] Incorrect DW_AT_decl_{line,column} in DW_TAG_imported_decl
2023-02-08 10:47 [Bug debug/108716] New: [10/11/12/13 Regression] Incorrect DW_AT_decl_{line,column} in DW_TAG_imported_decl jakub at gcc dot gnu.org
2023-02-08 10:47 ` [Bug debug/108716] " jakub at gcc dot gnu.org
2023-02-08 10:53 ` jakub at gcc dot gnu.org
@ 2023-03-02 18:19 ` cvs-commit at gcc dot gnu.org
2023-03-02 18:21 ` [Bug debug/108716] [10/11/12 " jakub at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-02 18:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108716
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:4d82022bfd15d36717bf60a11e75e9ea02204269
commit r13-6419-g4d82022bfd15d36717bf60a11e75e9ea02204269
Author: Jakub Jelinek <jakub@redhat.com>
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 } closing
the function.
The problem is that while we have correct EXPR_LOCATION on the USING_STMT,
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 <jakub@redhat.com>
PR debug/108716
* cp-gimplify.cc (cp_genericize_r) <case USING_STMT>: Set
DECL_SOURCE_LOCATION on IMPORTED_DECL to expression location
of USING_STMT or input_location.
* g++.dg/debug/dwarf2/pr108716.C: New test.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug debug/108716] [10/11/12 Regression] Incorrect DW_AT_decl_{line,column} in DW_TAG_imported_decl
2023-02-08 10:47 [Bug debug/108716] New: [10/11/12/13 Regression] Incorrect DW_AT_decl_{line,column} in DW_TAG_imported_decl jakub at gcc dot gnu.org
` (2 preceding siblings ...)
2023-03-02 18:19 ` cvs-commit at gcc dot gnu.org
@ 2023-03-02 18:21 ` jakub at gcc dot gnu.org
2023-03-19 5:30 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-03-02 18:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108716
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[10/11/12/13 Regression] |[10/11/12 Regression]
|Incorrect |Incorrect
|DW_AT_decl_{line,column} in |DW_AT_decl_{line,column} in
|DW_TAG_imported_decl |DW_TAG_imported_decl
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed on the trunk so far.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug debug/108716] [10/11/12 Regression] Incorrect DW_AT_decl_{line,column} in DW_TAG_imported_decl
2023-02-08 10:47 [Bug debug/108716] New: [10/11/12/13 Regression] Incorrect DW_AT_decl_{line,column} in DW_TAG_imported_decl jakub at gcc dot gnu.org
` (3 preceding siblings ...)
2023-03-02 18:21 ` [Bug debug/108716] [10/11/12 " jakub at gcc dot gnu.org
@ 2023-03-19 5:30 ` cvs-commit at gcc dot gnu.org
2023-03-20 10:28 ` [Bug debug/108716] [10/11 " jakub at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-19 5:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108716
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:ffc19cb58ef24a27be86f9efa1faaa6ca8ad17b0
commit r12-9281-gffc19cb58ef24a27be86f9efa1faaa6ca8ad17b0
Author: Jakub Jelinek <jakub@redhat.com>
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 } closing
the function.
The problem is that while we have correct EXPR_LOCATION on the USING_STMT,
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 <jakub@redhat.com>
PR debug/108716
* cp-gimplify.cc (cp_genericize_r) <case USING_STMT>: 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)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug debug/108716] [10/11 Regression] Incorrect DW_AT_decl_{line,column} in DW_TAG_imported_decl
2023-02-08 10:47 [Bug debug/108716] New: [10/11/12/13 Regression] Incorrect DW_AT_decl_{line,column} in DW_TAG_imported_decl jakub at gcc dot gnu.org
` (4 preceding siblings ...)
2023-03-19 5:30 ` cvs-commit at gcc dot gnu.org
@ 2023-03-20 10:28 ` jakub at gcc dot gnu.org
2023-05-02 20:15 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-03-20 10:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108716
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[10/11/12 Regression] |[10/11 Regression]
|Incorrect |Incorrect
|DW_AT_decl_{line,column} in |DW_AT_decl_{line,column} in
|DW_TAG_imported_decl |DW_TAG_imported_decl
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed for 12.3 too.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug debug/108716] [10/11 Regression] Incorrect DW_AT_decl_{line,column} in DW_TAG_imported_decl
2023-02-08 10:47 [Bug debug/108716] New: [10/11/12/13 Regression] Incorrect DW_AT_decl_{line,column} in DW_TAG_imported_decl jakub at gcc dot gnu.org
` (5 preceding siblings ...)
2023-03-20 10:28 ` [Bug debug/108716] [10/11 " jakub at gcc dot gnu.org
@ 2023-05-02 20:15 ` cvs-commit at gcc dot gnu.org
2023-05-03 10:38 ` [Bug debug/108716] [10 " jakub at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-02 20:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108716
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:2a6b112404837a3119985b58b886f63a88ec2cab
commit r11-10718-g2a6b112404837a3119985b58b886f63a88ec2cab
Author: Jakub Jelinek <jakub@redhat.com>
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 } closing
the function.
The problem is that while we have correct EXPR_LOCATION on the USING_STMT,
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 <jakub@redhat.com>
PR debug/108716
* cp-gimplify.c (cp_genericize_r) <case USING_STMT>: 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)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug debug/108716] [10 Regression] Incorrect DW_AT_decl_{line,column} in DW_TAG_imported_decl
2023-02-08 10:47 [Bug debug/108716] New: [10/11/12/13 Regression] Incorrect DW_AT_decl_{line,column} in DW_TAG_imported_decl jakub at gcc dot gnu.org
` (6 preceding siblings ...)
2023-05-02 20:15 ` cvs-commit at gcc dot gnu.org
@ 2023-05-03 10:38 ` jakub at gcc dot gnu.org
2023-05-03 15:22 ` cvs-commit at gcc dot gnu.org
2023-05-04 7:25 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-05-03 10:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108716
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[10/11 Regression] |[10 Regression] Incorrect
|Incorrect |DW_AT_decl_{line,column} in
|DW_AT_decl_{line,column} in |DW_TAG_imported_decl
|DW_TAG_imported_decl |
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed for 11.4 as well.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug debug/108716] [10 Regression] Incorrect DW_AT_decl_{line,column} in DW_TAG_imported_decl
2023-02-08 10:47 [Bug debug/108716] New: [10/11/12/13 Regression] Incorrect DW_AT_decl_{line,column} in DW_TAG_imported_decl jakub at gcc dot gnu.org
` (7 preceding siblings ...)
2023-05-03 10:38 ` [Bug debug/108716] [10 " jakub at gcc dot gnu.org
@ 2023-05-03 15:22 ` cvs-commit at gcc dot gnu.org
2023-05-04 7:25 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-03 15:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108716
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:17ea4d1f5d3609ef2540a10c29f57c0bd185ba4b
commit r10-11371-g17ea4d1f5d3609ef2540a10c29f57c0bd185ba4b
Author: Jakub Jelinek <jakub@redhat.com>
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 } closing
the function.
The problem is that while we have correct EXPR_LOCATION on the USING_STMT,
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 <jakub@redhat.com>
PR debug/108716
* cp-gimplify.c (cp_genericize_r) <case USING_STMT>: 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)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug debug/108716] [10 Regression] Incorrect DW_AT_decl_{line,column} in DW_TAG_imported_decl
2023-02-08 10:47 [Bug debug/108716] New: [10/11/12/13 Regression] Incorrect DW_AT_decl_{line,column} in DW_TAG_imported_decl jakub at gcc dot gnu.org
` (8 preceding siblings ...)
2023-05-03 15:22 ` cvs-commit at gcc dot gnu.org
@ 2023-05-04 7:25 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-05-04 7:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108716
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed for 10.5 too.
^ permalink raw reply [flat|nested] 11+ messages in thread