aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-12-27 08:08:17 +0000
committerRichard Stallman <rms@gnu.org>1992-12-27 08:08:17 +0000
commit3b94d087e81d9b39a0944a325825d49b557f3423 (patch)
tree1ae9c6d86b1afc2830fe9d041f4bba6d17272794
parentf5df292efc42b912b8babdd3593545fa3ec0842c (diff)
downloadgcc-3b94d087e81d9b39a0944a325825d49b557f3423.zip
gcc-3b94d087e81d9b39a0944a325825d49b557f3423.tar.gz
gcc-3b94d087e81d9b39a0944a325825d49b557f3423.tar.bz2
(expand_expr, constructor case): If we made a stack slot,
set MEM_IN_STRUCT_P if the type warrants it. From-SVN: r2921
-rw-r--r--gcc/expr.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 1881da4..31b2298 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -3621,10 +3621,11 @@ expand_expr (exp, target, tmode, modifier)
target = gen_reg_rtx (mode);
else
{
- rtx safe_target = assign_stack_temp (mode, int_size_in_bytes (type), 0);
- if (target)
- MEM_IN_STRUCT_P (safe_target) = MEM_IN_STRUCT_P (target);
- target = safe_target;
+ enum tree_code c = TREE_CODE (type);
+ target
+ = assign_stack_temp (mode, int_size_in_bytes (type), 0);
+ if (c == RECORD_TYPE || c == UNION_TYPE || c == ARRAY_TYPE)
+ MEM_IN_STRUCT_P (target) = 1;
}
}
store_constructor (exp, target);