From: Richard Kenner Date: Thu, 17 Jul 1997 15:26:30 +0000 (-0400) Subject: (expand_decl): If stack checking, use alloca for large vars. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5e4ef18a2b522c476698239fe541ddaff1d6d6b4;p=gcc.git (expand_decl): If stack checking, use alloca for large vars. From-SVN: r14472 --- 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;