diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1994-10-07 08:26:47 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1994-10-07 08:26:47 -0400 |
commit | 6676e72f969d58e2ff882ba1f6725101c74c69e7 (patch) | |
tree | de7ddb0483abd3c9748d2b0acdec22b37687d3c0 /gcc/expr.c | |
parent | fef0509b3d6c7b4d0960718505b1651b3eb32b78 (diff) | |
download | gcc-6676e72f969d58e2ff882ba1f6725101c74c69e7.zip gcc-6676e72f969d58e2ff882ba1f6725101c74c69e7.tar.gz gcc-6676e72f969d58e2ff882ba1f6725101c74c69e7.tar.bz2 |
(safe_from_p): If EXP has a variable size, assume safe.
(preexpand_calls): Don't preexpand a call that returns a variable-sized object.
From-SVN: r8234
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -3527,7 +3527,13 @@ safe_from_p (x, exp) rtx exp_rtl = 0; int i, nops; - if (x == 0) + if (x == 0 + /* If EXP has varying size, we MUST use a target since we currently + have no way of allocating temporaries of variable size. So we + assume here that something at a higher level has prevented a + clash. This is somewhat bogus, but the best we can do. */ + || (TREE_TYPE (exp) != 0 && + TREE_CODE (TYPE_SIZE (TREE_TYPE (exp))) != INTEGER_CST)) return 1; /* If this is a subreg of a hard register, declare it unsafe, otherwise, @@ -8316,7 +8322,9 @@ preexpand_calls (exp) /* Do nothing to built-in functions. */ if (TREE_CODE (TREE_OPERAND (exp, 0)) != ADDR_EXPR || TREE_CODE (TREE_OPERAND (TREE_OPERAND (exp, 0), 0)) != FUNCTION_DECL - || ! DECL_BUILT_IN (TREE_OPERAND (TREE_OPERAND (exp, 0), 0))) + || ! DECL_BUILT_IN (TREE_OPERAND (TREE_OPERAND (exp, 0), 0)) + /* Do nothing if the call returns a variable-sized object. */ + || TREE_CODE (TYPE_SIZE (TREE_TYPE(exp))) != INTEGER_CST) CALL_EXPR_RTL (exp) = expand_call (exp, NULL_RTX, 0); return; |