(expand_expr, case SAVE_EXPR): Handle the case where
authorJim Wilson <wilson@gcc.gnu.org>
Mon, 1 May 1995 23:26:28 +0000 (16:26 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Mon, 1 May 1995 23:26:28 +0000 (16:26 -0700)
mode is VOIDmode.

From-SVN: r9556

gcc/expr.c

index e940ccb3a9c3842de6cf99092c3d071bac0055a1..9ebbda9eda4b2c3692d18d9494cd98888cd8cb77 100644 (file)
@@ -4310,6 +4310,8 @@ expand_expr (exp, target, tmode, modifier)
                = assign_stack_temp (mode, int_size_in_bytes (type), 0);
              MEM_IN_STRUCT_P (temp) = AGGREGATE_TYPE_P (type);
            }
+         else if (mode == VOIDmode)
+           temp = const0_rtx;
          else
            temp = gen_reg_rtx (promote_mode (type, mode, &unsignedp, 0));
 
@@ -4331,7 +4333,10 @@ expand_expr (exp, target, tmode, modifier)
              SUBREG_PROMOTED_UNSIGNED_P (temp) = unsignedp;
            }
 
-         store_expr (TREE_OPERAND (exp, 0), temp, 0);
+         if (temp == const0_rtx)
+           expand_expr (TREE_OPERAND (exp, 0), const0_rtx, VOIDmode, 0);
+         else
+           store_expr (TREE_OPERAND (exp, 0), temp, 0);
        }
 
       /* If the mode of SAVE_EXPR_RTL does not match that of the expression, it