aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2025-04-10 13:30:42 +0200
committerRichard Biener <rguenth@gcc.gnu.org>2025-04-10 14:34:29 +0200
commitbf812c6ad83ec0b241bb3fecc7e68f883b6083df (patch)
treef10a5057f8a8a4a7f802f4a6901d4a15e75a2632 /gcc
parent95f10974a9190e345776604480a2df0191104308 (diff)
downloadgcc-bf812c6ad83ec0b241bb3fecc7e68f883b6083df.zip
gcc-bf812c6ad83ec0b241bb3fecc7e68f883b6083df.tar.gz
gcc-bf812c6ad83ec0b241bb3fecc7e68f883b6083df.tar.bz2
middle-end/119706 - allow POLY_INT_CST as is_gimple_mem_ref_addr
We currently only INTEGER_CST, but not POLY_INT_CST, which leads to the situation that when the POLY_INT_CST is only indrectly present via a SSA def the IL is valid but when propagated it's not. That's unsustainable. PR middle-end/119706 * gimple-expr.cc (is_gimple_mem_ref_addr): Also allow POLY_INT_CST.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/gimple-expr.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/gimple-expr.cc b/gcc/gimple-expr.cc
index a670e46..c0367f4 100644
--- a/gcc/gimple-expr.cc
+++ b/gcc/gimple-expr.cc
@@ -884,7 +884,7 @@ bool
is_gimple_mem_ref_addr (tree t)
{
return (is_gimple_reg (t)
- || TREE_CODE (t) == INTEGER_CST
+ || poly_int_tree_p (t)
|| (TREE_CODE (t) == ADDR_EXPR
&& (CONSTANT_CLASS_P (TREE_OPERAND (t, 0))
|| decl_address_invariant_p (TREE_OPERAND (t, 0)))));