aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2024-08-29 13:23:18 -0600
committerTom Tromey <tromey@adacore.com>2024-09-04 12:37:54 -0600
commit5326306e7d9d36eccc2c2f02e1357818625f057b (patch)
treecf29d175e72be660ef660744f999c1c897f62277 /gcc
parent0455e85e4eda7d80bda967914d634fe5b71b7ffc (diff)
downloadgcc-5326306e7d9d36eccc2c2f02e1357818625f057b.zip
gcc-5326306e7d9d36eccc2c2f02e1357818625f057b.tar.gz
gcc-5326306e7d9d36eccc2c2f02e1357818625f057b.tar.bz2
Check DECL_NAMELESS in modified_type_die
While working on a patch to the Ada compiler, I found a spot in dwarf2out.cc that calls add_name_attribute without respecting DECL_NAMELESS. gcc * dwarf2out.cc (modified_type_die): Check DECL_NAMELESS.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/dwarf2out.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc
index 89c2fd0..a7ec359 100644
--- a/gcc/dwarf2out.cc
+++ b/gcc/dwarf2out.cc
@@ -14019,6 +14019,7 @@ modified_type_die (tree type, int cv_quals, bool reverse,
|| (cv_quals == TYPE_UNQUALIFIED)))
|| (TREE_CODE (name) == TYPE_DECL
&& DECL_NAME (name)
+ && !DECL_NAMELESS (name)
&& (TREE_TYPE (name) == qualified_type
|| (lang_hooks.types.get_debug_type
&& (lang_hooks.types.get_debug_type (TREE_TYPE (name))