From 3b94d087e81d9b39a0944a325825d49b557f3423 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Sun, 27 Dec 1992 08:08:17 +0000 Subject: [PATCH] (expand_expr, constructor case): If we made a stack slot, set MEM_IN_STRUCT_P if the type warrants it. From-SVN: r2921 --- gcc/expr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gcc/expr.c b/gcc/expr.c index 1881da40ed5..31b229876b1 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); -- 2.30.2