aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2004-01-10 21:50:53 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2004-01-10 20:50:53 +0000
commitcf7cb67e9770fde9bfb8c899882b7395f1fe17b0 (patch)
treec55bbe6b26289b7892070423b47a17ca102298b8 /gcc/expr.c
parenta8d6534992171afbaaa8523837f584d753ec5d4c (diff)
downloadgcc-cf7cb67e9770fde9bfb8c899882b7395f1fe17b0.zip
gcc-cf7cb67e9770fde9bfb8c899882b7395f1fe17b0.tar.gz
gcc-cf7cb67e9770fde9bfb8c899882b7395f1fe17b0.tar.bz2
* expr.c (expand_expr_real): More curefully expand union casts.
From-SVN: r75649
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 6442b3d..73fb965 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -7509,7 +7509,12 @@ expand_expr_real (tree exp, rtx target, enum machine_mode tmode,
}
if (target == 0)
- target = assign_temp (type, 0, 1, 1);
+ {
+ if (TYPE_MODE (type) != BLKmode)
+ target = gen_reg_rtx (TYPE_MODE (type));
+ else
+ target = assign_temp (type, 0, 1, 1);
+ }
if (GET_CODE (target) == MEM)
/* Store data into beginning of memory target. */