[gcc(refs/vendors/ARM/heads/morello)] morello: Don't treat TYPE_P nodes as capability values
Matthew Malcomson
matmal01@gcc.gnu.org
Mon Mar 14 10:35:17 GMT 2022
https://gcc.gnu.org/g:473121a7071e99c7953002b8e0103688bd1ba3a3
commit 473121a7071e99c7953002b8e0103688bd1ba3a3
Author: Alex Coplan <alex.coplan@arm.com>
Date: Fri Feb 11 14:23:46 2022 +0000
morello: Don't treat TYPE_P nodes as capability values
Return false in tree_is_capability_value for TYPE_P tree nodes: these
are not capability *values*. The C++ frontend often ends up with types
where we expect a value when doing template substitution, we don't want
to treat these as capability values.
gcc/ChangeLog:
* tree.h (tree_is_capability_value): Return false if argument is
TYPE_P.
Diff:
---
gcc/tree.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gcc/tree.h b/gcc/tree.h
index c2fbd1eccdf..674eb1acf64 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -6366,7 +6366,10 @@ fndecl_built_in_p (const_tree node, built_in_function name)
static inline bool
tree_is_capability_value (const_tree t)
{
- return t && t != error_mark_node && capability_type_p (TREE_TYPE (t));
+ return t
+ && t != error_mark_node
+ && !TYPE_P (t)
+ && capability_type_p (TREE_TYPE (t));
}
inline wide_int
More information about the Gcc-cvs
mailing list