aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-expr.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2021-05-25 10:21:41 +0200
committerRichard Biener <rguenther@suse.de>2021-05-25 11:11:02 +0200
commit316bdb2e8970a461f2ae1a7183262d18a72adab3 (patch)
tree54cf30bf2a06382386086dc5e426039c798cbc0c /gcc/gimple-expr.c
parent3a81735c1c8cea4323dcb912b7a8879b54aa3bc0 (diff)
downloadgcc-316bdb2e8970a461f2ae1a7183262d18a72adab3.zip
gcc-316bdb2e8970a461f2ae1a7183262d18a72adab3.tar.gz
gcc-316bdb2e8970a461f2ae1a7183262d18a72adab3.tar.bz2
middle-end/100727 - fix call expansion with WITH_SIZE_EXPR arg
call expansion used the result of get_base_address to switch between ABIs - with get_base_address now never returning NULL we have to re-instantiate the check in a more explicit way. This also adjusts mark_addressable to skip WITH_SIZE_EXPRs, consistent with how build_fold_addr_expr handles it. 2021-05-25 Richard Biener <rguenther@suse.de> PR middle-end/100727 * calls.c (initialize_argument_information): Explicitely test for WITH_SIZE_EXPR. * gimple-expr.c (mark_addressable): Skip outer WITH_SIZE_EXPR.
Diffstat (limited to 'gcc/gimple-expr.c')
-rw-r--r--gcc/gimple-expr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/gimple-expr.c b/gcc/gimple-expr.c
index b8c732b..c321179 100644
--- a/gcc/gimple-expr.c
+++ b/gcc/gimple-expr.c
@@ -900,6 +900,8 @@ flush_mark_addressable_queue ()
void
mark_addressable (tree x)
{
+ if (TREE_CODE (x) == WITH_SIZE_EXPR)
+ x = TREE_OPERAND (x, 0);
while (handled_component_p (x))
x = TREE_OPERAND (x, 0);
if (TREE_CODE (x) == MEM_REF