https://gcc.gnu.org/g:63f6fe8156c151f9e97422a1fea8ad9a7b74f885
commit r17-6571-g63f6fe8156c151f9e97422a1fea8ad9a7b74f885 Author: Arsen Arsenović <[email protected]> Date: Mon Nov 16 14:39:53 2026 +0000 gcc/c++: don't use cp_type_quals for LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN This is a temporary measure to fix PR target/128734 until the support for C++ named address spaces is merged. By leaving this function as default, we don't reach the assert that checks for address space qualification that we can't handle. The named address space patches allow us to use cp_type_quals as LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN again. Note that the presence of this address space qualification can lead to ICEs in the compiler, as shown in the comments on that PR, on specific (but rare) cases. gcc/cp/ChangeLog: PR target/128734 * cp-objcp-common.cc (cp_type_quals_as_set): Remove. * cp-objcp-common.h (cp_type_quals_as_set): Remove. (LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN): Leave as default. Diff: --- gcc/cp/cp-objcp-common.cc | 7 ------- gcc/cp/cp-objcp-common.h | 3 --- 2 files changed, 10 deletions(-) diff --git a/gcc/cp/cp-objcp-common.cc b/gcc/cp/cp-objcp-common.cc index 8af1446cc9da..19ee211e248f 100644 --- a/gcc/cp/cp-objcp-common.cc +++ b/gcc/cp/cp-objcp-common.cc @@ -745,11 +745,4 @@ cp_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value, return c_common_handle_option (scode, arg, value, kind, loc, handlers); } -/* Like cp_type_quals, but returns a qualifier set. Will become unnecessary - once the C++ FE supports named address spaces. */ - -qualifier_set -cp_type_quals_as_set (const_tree type) -{ return { cp_type_quals (type) }; } - #include "gt-cp-cp-objcp-common.h" diff --git a/gcc/cp/cp-objcp-common.h b/gcc/cp/cp-objcp-common.h index acd6f97ac5e5..bd4d16751ee8 100644 --- a/gcc/cp/cp-objcp-common.h +++ b/gcc/cp/cp-objcp-common.h @@ -42,7 +42,6 @@ extern tree cxx_simulate_enum_decl (location_t, const char *, vec<string_int_pair> *); extern tree cxx_simulate_record_decl (location_t, const char *, array_slice<const tree>); -extern qualifier_set cp_type_quals_as_set (const_tree type); /* Lang hooks that are shared between C++ and ObjC++ are defined here. Hooks specific to C++ or ObjC++ go in cp/cp-lang.cc and objcp/objcp-lang.cc, @@ -142,8 +141,6 @@ static const scoped_attribute_specs *const cp_objcp_attribute_table[] = #define LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P cp_var_mod_type_p #undef LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN #define LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN cp_dump_tree -#undef LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN -#define LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN cp_type_quals_as_set #undef LANG_HOOKS_MAKE_TYPE #define LANG_HOOKS_MAKE_TYPE cxx_make_type_hook
