From 5e4ef18a2b522c476698239fe541ddaff1d6d6b4 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Thu, 17 Jul 1997 11:26:30 -0400 Subject: [PATCH] (expand_decl): If stack checking, use alloca for large vars. From-SVN: r14472 --- gcc/stmt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/stmt.c b/gcc/stmt.c index fb17900046c..0dcb4cba8cb 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -3573,7 +3573,11 @@ expand_decl (decl) / BITS_PER_UNIT)); } - else if (TREE_CODE (DECL_SIZE (decl)) == INTEGER_CST) + else if (TREE_CODE (DECL_SIZE (decl)) == INTEGER_CST + && ! (flag_stack_check && ! STACK_CHECK_BUILTIN + && (TREE_INT_CST_HIGH (DECL_SIZE (decl)) != 0 + || (TREE_INT_CST_LOW (DECL_SIZE (decl)) + > STACK_CHECK_MAX_VAR_SIZE * BITS_PER_UNIT)))) { /* Variable of fixed size that goes on the stack. */ rtx oldaddr = 0; -- 2.30.2