public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/ARM/heads/morello)] Minor fix to __capability handling
@ 2022-05-05 12:04 Matthew Malcomson
  0 siblings, 0 replies; only message in thread
From: Matthew Malcomson @ 2022-05-05 12:04 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:30e16bf212a0692e9b3b34e19102c4f13af88740

commit 30e16bf212a0692e9b3b34e19102c4f13af88740
Author: Matthew Malcomson <matthew.malcomson@arm.com>
Date:   Thu Mar 17 15:49:44 2022 +0000

    Minor fix to __capability handling
    
    Ensure we modify the `treetoedit` pointer we look through rather than `node` directly.

Diff:
---
 gcc/c-family/c-attribs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/c-family/c-attribs.c b/gcc/c-family/c-attribs.c
index 7ab3e41f626..7b299b9ce9e 100644
--- a/gcc/c-family/c-attribs.c
+++ b/gcc/c-family/c-attribs.c
@@ -857,7 +857,7 @@ handle_cheri_capability_attribute (tree *node, tree ARG_UNUSED (name),
 	 POINTER_TYPE_P.  */
       tree *treetoedit = node;
       for (int i = 1; i < capability_pointer_depth; i++)
-	treetoedit = &TREE_TYPE (*node);
+	treetoedit = &TREE_TYPE (*treetoedit);
       gcc_assert (TREE_CODE (*treetoedit) == POINTER_TYPE);
 
       /* Call build_pointer_type_for_mode to create a Capability Pointer


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-05 12:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-05 12:04 [gcc(refs/vendors/ARM/heads/morello)] Minor fix to __capability handling 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).