* [Bug debug/111080] restrict qualifier causes extra debug info to happen
2023-08-20 9:19 [Bug debug/111080] New: restrict qualifier leaks debug info sagebar at web dot de
@ 2023-08-20 9:24 ` pinskia at gcc dot gnu.org
2023-08-20 9:28 ` [Bug debug/111080] [11/12/13/14 Regression] " pinskia at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-08-20 9:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111080
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
> static int (*fun_t)(struct foo *); // Leak (even w/o restrict!)
> int (*fun_t)(struct foo *); // Leak (even w/o restrict!)
The above should include the foo debug information as those are variable
definitions of a pointer to a function that has foo as an argument type.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug debug/111080] [11/12/13/14 Regression] restrict qualifier causes extra debug info to happen
2023-08-20 9:19 [Bug debug/111080] New: restrict qualifier leaks debug info sagebar at web dot de
2023-08-20 9:24 ` [Bug debug/111080] restrict qualifier causes extra debug info to happen pinskia at gcc dot gnu.org
@ 2023-08-20 9:28 ` pinskia at gcc dot gnu.org
2023-08-20 9:34 ` sagebar at web dot de
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-08-20 9:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111080
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|restrict qualifier causes |[11/12/13/14 Regression]
|extra debug info to happen |restrict qualifier causes
| |extra debug info to happen
Known to work| |4.9.1
Target Milestone|--- |11.5
Known to fail| |5.1.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug debug/111080] [11/12/13/14 Regression] restrict qualifier causes extra debug info to happen
2023-08-20 9:19 [Bug debug/111080] New: restrict qualifier leaks debug info sagebar at web dot de
2023-08-20 9:24 ` [Bug debug/111080] restrict qualifier causes extra debug info to happen pinskia at gcc dot gnu.org
2023-08-20 9:28 ` [Bug debug/111080] [11/12/13/14 Regression] " pinskia at gcc dot gnu.org
@ 2023-08-20 9:34 ` sagebar at web dot de
2023-08-21 8:30 ` rguenth at gcc dot gnu.org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: sagebar at web dot de @ 2023-08-20 9:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111080
--- Comment #2 from sagebar at web dot de ---
@Andrew Pinski
Of course: yes. I did make a mistake there, but only for this case:
> int (*fun_t)(struct foo *); // Leak (even w/o restrict!)
asm:
...
.globl fun_t
.section .bss
.align 4
.type fun_t, @object
.size fun_t, 4
fun_t:
.zero 4
...
In the other case:
> static int (*fun_t)(struct foo *); // Leak (even w/o restrict!)
asm:
...
# No data-symbol is generated for `fun_t`
...
Gcc actually doesn't generate a .bss-symbol for the static variable (since it's
unused), but it still generates debug inforation for `struct foo`. So I guess
strike `int (*fun_t)(struct foo *);` from the list, but keep `static int
(*fun_t)(struct foo *);` which still leaks
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug debug/111080] [11/12/13/14 Regression] restrict qualifier causes extra debug info to happen
2023-08-20 9:19 [Bug debug/111080] New: restrict qualifier leaks debug info sagebar at web dot de
` (2 preceding siblings ...)
2023-08-20 9:34 ` sagebar at web dot de
@ 2023-08-21 8:30 ` rguenth at gcc dot gnu.org
2023-08-22 12:55 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-08-21 8:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111080
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2023-08-21
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed. This is because prune_unused_types_walk marks all restrict types as
necessary. There's also DW_TAG_shared_type that's not handled.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug debug/111080] [11/12/13/14 Regression] restrict qualifier causes extra debug info to happen
2023-08-20 9:19 [Bug debug/111080] New: restrict qualifier leaks debug info sagebar at web dot de
` (3 preceding siblings ...)
2023-08-21 8:30 ` rguenth at gcc dot gnu.org
@ 2023-08-22 12:55 ` rguenth at gcc dot gnu.org
2023-08-24 6:23 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-08-22 12:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111080
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|needs-bisection |
Priority|P3 |P2
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug debug/111080] [11/12/13/14 Regression] restrict qualifier causes extra debug info to happen
2023-08-20 9:19 [Bug debug/111080] New: restrict qualifier leaks debug info sagebar at web dot de
` (4 preceding siblings ...)
2023-08-22 12:55 ` rguenth at gcc dot gnu.org
@ 2023-08-24 6:23 ` cvs-commit at gcc dot gnu.org
2023-08-24 7:10 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-08-24 6:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111080
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:bd2c4d6d8fffd5a6dae5217d6076cc4190bab13d
commit r14-3421-gbd2c4d6d8fffd5a6dae5217d6076cc4190bab13d
Author: Richard Biener <rguenther@suse.de>
Date: Mon Aug 21 10:34:30 2023 +0200
debug/111080 - avoid outputting debug info for unused restrict qualified
type
The following applies some maintainance with respect to type qualifiers
and kinds added by later DWARF standards to prune_unused_types_walk.
The particular case in the bug is not handling (thus marking required)
all restrict qualified type DIEs. I've found more DW_TAG_*_type that
are unhandled, looked up the DWARF docs and added them as well based
on common sense.
PR debug/111080
* dwarf2out.cc (prune_unused_types_walk): Handle
DW_TAG_restrict_type, DW_TAG_shared_type, DW_TAG_atomic_type,
DW_TAG_immutable_type, DW_TAG_coarray_type, DW_TAG_unspecified_type
and DW_TAG_dynamic_type as to only output them when referenced.
* gcc.dg/debug/dwarf2/pr111080.c: New testcase.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug debug/111080] [11/12/13/14 Regression] restrict qualifier causes extra debug info to happen
2023-08-20 9:19 [Bug debug/111080] New: restrict qualifier leaks debug info sagebar at web dot de
` (5 preceding siblings ...)
2023-08-24 6:23 ` cvs-commit at gcc dot gnu.org
@ 2023-08-24 7:10 ` cvs-commit at gcc dot gnu.org
2023-08-24 7:10 ` [Bug debug/111080] [11/12 " rguenth at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-08-24 7:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111080
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:fb6d61299159275246052c72c6e3666b36d5b333
commit r13-7750-gfb6d61299159275246052c72c6e3666b36d5b333
Author: Richard Biener <rguenther@suse.de>
Date: Mon Aug 21 10:34:30 2023 +0200
debug/111080 - avoid outputting debug info for unused restrict qualified
type
The following applies some maintainance with respect to type qualifiers
and kinds added by later DWARF standards to prune_unused_types_walk.
The particular case in the bug is not handling (thus marking required)
all restrict qualified type DIEs. I've found more DW_TAG_*_type that
are unhandled, looked up the DWARF docs and added them as well based
on common sense.
PR debug/111080
* dwarf2out.cc (prune_unused_types_walk): Handle
DW_TAG_restrict_type, DW_TAG_shared_type, DW_TAG_atomic_type,
DW_TAG_immutable_type, DW_TAG_coarray_type, DW_TAG_unspecified_type
and DW_TAG_dynamic_type as to only output them when referenced.
* gcc.dg/debug/dwarf2/pr111080.c: New testcase.
(cherry picked from commit bd2c4d6d8fffd5a6dae5217d6076cc4190bab13d)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug debug/111080] [11/12 Regression] restrict qualifier causes extra debug info to happen
2023-08-20 9:19 [Bug debug/111080] New: restrict qualifier leaks debug info sagebar at web dot de
` (6 preceding siblings ...)
2023-08-24 7:10 ` cvs-commit at gcc dot gnu.org
@ 2023-08-24 7:10 ` rguenth at gcc dot gnu.org
2023-12-15 13:17 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-08-24 7:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111080
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[11/12/13/14 Regression] |[11/12 Regression] restrict
|restrict qualifier causes |qualifier causes extra
|extra debug info to happen |debug info to happen
Known to fail| |13.2.0
Known to work| |13.2.1, 14.0
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk and for GCC 13.3 sofar.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug debug/111080] [11/12 Regression] restrict qualifier causes extra debug info to happen
2023-08-20 9:19 [Bug debug/111080] New: restrict qualifier leaks debug info sagebar at web dot de
` (7 preceding siblings ...)
2023-08-24 7:10 ` [Bug debug/111080] [11/12 " rguenth at gcc dot gnu.org
@ 2023-12-15 13:17 ` cvs-commit at gcc dot gnu.org
2024-06-21 9:22 ` [Bug debug/111080] [11 " cvs-commit at gcc dot gnu.org
2024-06-21 9:38 ` rguenth at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-12-15 13:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111080
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:5c3ab44771d0524140cf2ce5de594fcf7fefcd6f
commit r12-10044-g5c3ab44771d0524140cf2ce5de594fcf7fefcd6f
Author: Richard Biener <rguenther@suse.de>
Date: Mon Aug 21 10:34:30 2023 +0200
debug/111080 - avoid outputting debug info for unused restrict qualified
type
The following applies some maintainance with respect to type qualifiers
and kinds added by later DWARF standards to prune_unused_types_walk.
The particular case in the bug is not handling (thus marking required)
all restrict qualified type DIEs. I've found more DW_TAG_*_type that
are unhandled, looked up the DWARF docs and added them as well based
on common sense.
PR debug/111080
* dwarf2out.cc (prune_unused_types_walk): Handle
DW_TAG_restrict_type, DW_TAG_shared_type, DW_TAG_atomic_type,
DW_TAG_immutable_type, DW_TAG_coarray_type, DW_TAG_unspecified_type
and DW_TAG_dynamic_type as to only output them when referenced.
* gcc.dg/debug/dwarf2/pr111080.c: New testcase.
(cherry picked from commit bd2c4d6d8fffd5a6dae5217d6076cc4190bab13d)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug debug/111080] [11 Regression] restrict qualifier causes extra debug info to happen
2023-08-20 9:19 [Bug debug/111080] New: restrict qualifier leaks debug info sagebar at web dot de
` (8 preceding siblings ...)
2023-12-15 13:17 ` cvs-commit at gcc dot gnu.org
@ 2024-06-21 9:22 ` cvs-commit at gcc dot gnu.org
2024-06-21 9:38 ` rguenth at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-06-21 9:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111080
--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:80ded4e8f871c98481bab912997034b9d24b1c96
commit r11-11527-g80ded4e8f871c98481bab912997034b9d24b1c96
Author: Richard Biener <rguenther@suse.de>
Date: Mon Aug 21 10:34:30 2023 +0200
debug/111080 - avoid outputting debug info for unused restrict qualified
type
The following applies some maintainance with respect to type qualifiers
and kinds added by later DWARF standards to prune_unused_types_walk.
The particular case in the bug is not handling (thus marking required)
all restrict qualified type DIEs. I've found more DW_TAG_*_type that
are unhandled, looked up the DWARF docs and added them as well based
on common sense.
PR debug/111080
* dwarf2out.c (prune_unused_types_walk): Handle
DW_TAG_restrict_type, DW_TAG_shared_type, DW_TAG_atomic_type,
DW_TAG_immutable_type, DW_TAG_coarray_type, DW_TAG_unspecified_type
and DW_TAG_dynamic_type as to only output them when referenced.
* gcc.dg/debug/dwarf2/pr111080.c: New testcase.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug debug/111080] [11 Regression] restrict qualifier causes extra debug info to happen
2023-08-20 9:19 [Bug debug/111080] New: restrict qualifier leaks debug info sagebar at web dot de
` (9 preceding siblings ...)
2024-06-21 9:22 ` [Bug debug/111080] [11 " cvs-commit at gcc dot gnu.org
@ 2024-06-21 9:38 ` rguenth at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-06-21 9:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111080
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 12+ messages in thread