aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-08-15 17:51:44 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1995-08-15 17:51:44 -0400
commitf4510f3757fc32ae871aa5e7c77a078590b173ed (patch)
treecae8239f4fe3b6438526e40831373f0e771a33b9 /gcc
parente07ed33f92f226ad40e10f17a53028a4659196d7 (diff)
downloadgcc-f4510f3757fc32ae871aa5e7c77a078590b173ed.zip
gcc-f4510f3757fc32ae871aa5e7c77a078590b173ed.tar.gz
gcc-f4510f3757fc32ae871aa5e7c77a078590b173ed.tar.bz2
(safe_from_p): Only safe if EXP is variable-size and X is BLKmode.
From-SVN: r10243
Diffstat (limited to 'gcc')
-rw-r--r--gcc/expr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 421f942..5e5b3b3 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -3814,9 +3814,11 @@ safe_from_p (x, exp)
/* 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. */
+ clash. This is somewhat bogus, but the best we can do. Only
+ do this when X is BLKmode. */
|| (TREE_TYPE (exp) != 0 && TYPE_SIZE (TREE_TYPE (exp)) != 0
- && TREE_CODE (TYPE_SIZE (TREE_TYPE (exp))) != INTEGER_CST))
+ && TREE_CODE (TYPE_SIZE (TREE_TYPE (exp))) != INTEGER_CST
+ && GET_MODE (x) == BLKmode))
return 1;
/* If this is a subreg of a hard register, declare it unsafe, otherwise,