aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index daa0b71..623cdbf 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -1754,11 +1754,12 @@ gimplify_decl_expr (tree *stmt_p, gimple_seq *seq_p)
tree init = DECL_INITIAL (decl);
bool is_vla = false;
- if (TREE_CODE (DECL_SIZE_UNIT (decl)) != INTEGER_CST
+ poly_uint64 size;
+ if (!poly_int_tree_p (DECL_SIZE_UNIT (decl), &size)
|| (!TREE_STATIC (decl)
&& flag_stack_check == GENERIC_STACK_CHECK
- && compare_tree_int (DECL_SIZE_UNIT (decl),
- STACK_CHECK_MAX_VAR_SIZE) > 0))
+ && maybe_gt (size,
+ (unsigned HOST_WIDE_INT) STACK_CHECK_MAX_VAR_SIZE)))
{
gimplify_vla_decl (decl, seq_p);
is_vla = true;