aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2019-11-08 09:06:50 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2019-11-08 09:06:50 +0000
commitbe5f7eccf766a4c3a59b821f77ce320001df838f (patch)
treeee509b6f5eec1502b7562e6c72ec021a316b84fc /gcc/tree-inline.c
parentf1e1ed3314b7c6308f64cbbcf6d1916e239c8e35 (diff)
downloadgcc-be5f7eccf766a4c3a59b821f77ce320001df838f.zip
gcc-be5f7eccf766a4c3a59b821f77ce320001df838f.tar.gz
gcc-be5f7eccf766a4c3a59b821f77ce320001df838f.tar.bz2
Handle POLY_INT_CSTs in declare_return_value
SVE allows variable-length vectors to be returned by value, which tripped the assert in declare_return_variable. 2019-11-08 Richard Sandiford <richard.sandiford@arm.com> gcc/ * tree-inline.c (declare_return_variable): Check for poly_int_tree_p instead of INTEGER_CST. gcc/testsuite/ * gcc.target/aarch64/sve/acle/general/inline_1.c: New test. From-SVN: r277956
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 2b8b9ee..9d0acd9 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -3654,7 +3654,7 @@ declare_return_variable (copy_body_data *id, tree return_slot, tree modify_dest,
/* ??? If we're assigning to a variable sized type, then we must
reuse the destination variable, because we've no good way to
create variable sized temporaries at this point. */
- else if (TREE_CODE (TYPE_SIZE_UNIT (caller_type)) != INTEGER_CST)
+ else if (!poly_int_tree_p (TYPE_SIZE_UNIT (caller_type)))
use_it = true;
/* If the callee cannot possibly modify MODIFY_DEST, then we can
@@ -3689,7 +3689,7 @@ declare_return_variable (copy_body_data *id, tree return_slot, tree modify_dest,
}
}
- gcc_assert (TREE_CODE (TYPE_SIZE_UNIT (callee_type)) == INTEGER_CST);
+ gcc_assert (poly_int_tree_p (TYPE_SIZE_UNIT (callee_type)));
var = copy_result_decl_to_var (result, id);
DECL_SEEN_IN_BIND_EXPR_P (var) = 1;