public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/ARM/heads/morello)] vrp: Fix ICE for pointer cap<->noncap casts
@ 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:7b533cd785ed59adb3bdd5d49a0b3fcb43624301
commit 7b533cd785ed59adb3bdd5d49a0b3fcb43624301
Author: Richard Sandiford <richard.sandiford@arm.com>
Date: Mon Mar 14 18:10:58 2022 +0000
vrp: Fix ICE for pointer cap<->noncap casts
vrp_insert::find_assert_locations_in_bb has code to register
assertions for operands of a statement, which we protected
against capabilities. However, it also has code to register
assertions for the sources of conversions, and those need to
be protected against capabilities too.
Diff:
---
gcc/tree-vrp.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 0a5ab8c579b..19bf6acc7ef 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -2926,8 +2926,6 @@ vrp_insert::find_assert_locations_in_bb (basic_block bb)
/* See if we can derive an assertion for any of STMT's operands. */
FOR_EACH_SSA_TREE_OPERAND (op, stmt, i, SSA_OP_USE)
{
- if (capability_type_p (TREE_TYPE (op)))
- continue;
tree value;
enum tree_code comp_code;
@@ -2966,13 +2964,16 @@ vrp_insert::find_assert_locations_in_bb (basic_block bb)
/* Note we want to register the assert for the
operand of the NOP_EXPR after SI, not after the
conversion. */
- if (live.live_on_block_p (t, bb))
+ if (live.live_on_block_p (t, bb)
+ && !capability_type_p (TREE_TYPE (t)))
register_new_assert_for (t, t, comp_code, value,
bb, NULL, si);
}
}
- register_new_assert_for (op, op, comp_code, value, bb, NULL, si);
+ if (!capability_type_p (TREE_TYPE (op)))
+ register_new_assert_for (op, op, comp_code, value,
+ bb, NULL, si);
}
}
^ 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)] vrp: Fix ICE for pointer cap<->noncap casts 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).