(expand_expr, constructor case): If we made a stack slot,
authorRichard Stallman <rms@gnu.org>
Sun, 27 Dec 1992 08:08:17 +0000 (08:08 +0000)
committerRichard Stallman <rms@gnu.org>
Sun, 27 Dec 1992 08:08:17 +0000 (08:08 +0000)
set MEM_IN_STRUCT_P if the type warrants it.

From-SVN: r2921

gcc/expr.c

index 1881da40ed52c32f7f6b0cb6787fb86882369780..31b229876b115f35542cc425f1eccfbc0a1c4dfb 100644 (file)
@@ -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);