C++: Bypass address-space qualification check during type dumping
Temporarily disables a C++ compiler assert related to address spaces to unblock compilation.
A temporary workaround has been implemented in the GCC C++ front-end to bypass an assertion that checked for address-space qualification. This prevents compiler internal errors (ICEs) in rare cases related to C++ named address spaces, which are not yet fully supported. The change ensures that compilation can proceed until full support for these address spaces is merged, at which point the original type qualification checks can be reinstated.
In Details
This commit addresses PR target/128734 by temporarily disabling the LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN hook for C++ when named address spaces are involved. The cp_type_quals_as_set function, which previously provided this functionality, was removed. The issue arises because the compiler lacks full support for C++ named address spaces, leading to an assertion failure when cp_type_quals is used in this context. By reverting to a default behavior, the assert is avoided. This is a workaround until the C++ named address space patches are fully integrated, allowing cp_type_quals to be used…
- ICE
- Internal Compiler Error. An error condition indicating that the compiler itself has encountered an unrecoverable problem during the compilation process, typically due to a bug in the compiler.
- C++ named address spaces
- A feature in C++ that allows programmers to explicitly specify memory regions (address spaces) for variables, distinct from the default address space. This can be used for memory-mapped I/O or custom memory architectures.
- LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN
- A GCC internal hook used for dumping type qualification information during tree traversal. Type qualifiers in C++ include things like const, volatile, and potentially address space information.