public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/ARM/heads/morello)] morello: Don't treat TYPE_P nodes as capability values
@ 2022-03-14 10:35 Matthew Malcomson
0 siblings, 0 replies; only message in thread
From: Matthew Malcomson @ 2022-03-14 10:35 UTC (permalink / raw)
To: gcc-cvs
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-03-14 10:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-14 10:35 [gcc(refs/vendors/ARM/heads/morello)] morello: Don't treat TYPE_P nodes as capability values Matthew Malcomson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).