>>>>> "Richard" == Richard Biener <richard.guent...@gmail.com> writes:
Richard> Honoring DECL_NAMELESS is obvious enough to me that I'd approve Richard> such a change Ok, how about the appended? thanks, Tom commit 01ce41f7e0b023b7f67b48d85ead11cea1c96205 Author: Tom Tromey <tro...@adacore.com> Date: Thu Aug 29 13:23:18 2024 -0600 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. diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc index 89c2fd02649..a7ec359bd0c 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))