]> gcc.gnu.org Git - gcc.git/commit
debug/111080 - avoid outputting debug info for unused restrict qualified type
authorRichard Biener <rguenther@suse.de>
Mon, 21 Aug 2023 08:34:30 +0000 (10:34 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 15 Dec 2023 12:18:57 +0000 (13:18 +0100)
commit5c3ab44771d0524140cf2ce5de594fcf7fefcd6f
tree7f65182201b4e7de59f7ff19c7582ff687d6b62f
parente35556c61bdeb9f41b4111fffb423a705232ab9c
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)
gcc/dwarf2out.cc
gcc/testsuite/gcc.dg/debug/dwarf2/pr111080.c [new file with mode: 0644]
This page took 0.071843 seconds and 6 git commands to generate.