aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1997-07-25 08:36:27 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1997-07-25 08:36:27 -0400
commit2d59d98e014a64f5a48cbb3033f25896b2d9ab79 (patch)
treefeb5fe8d378f43e5da57258b31614b95bfd1751f
parent06f0e8f37cd12355aa5ce4e51024d3477d2970ac (diff)
downloadgcc-2d59d98e014a64f5a48cbb3033f25896b2d9ab79.zip
gcc-2d59d98e014a64f5a48cbb3033f25896b2d9ab79.tar.gz
gcc-2d59d98e014a64f5a48cbb3033f25896b2d9ab79.tar.bz2
(expand_call): If -fstack-check and temp needed for arg is too large,
use alloca. From-SVN: r14526
-rw-r--r--gcc/calls.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/calls.c b/gcc/calls.c
index c510a33..35166a5 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -1051,7 +1051,11 @@ expand_call (exp, target, ignore)
rtx copy;
if (TYPE_SIZE (type) == 0
- || TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
+ || TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST
+ || (flag_stack_check && ! STACK_CHECK_BUILTIN
+ && (TREE_INT_CST_HIGH (TYPE_SIZE (type)) != 0
+ || (TREE_INT_CST_LOW (TYPE_SIZE (type))
+ > STACK_CHECK_MAX_VAR_SIZE * BITS_PER_UNIT))))
{
/* This is a variable-sized object. Make space on the stack
for it. */