aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-03-19 08:42:28 +0000
committerRichard Stallman <rms@gnu.org>1993-03-19 08:42:28 +0000
commit665381933b28226f275d86853b0bbfe96693759b (patch)
tree44a33c298d597ebcdd3f5ff83e5eca4606941449
parent70a73141e04e5ad042099082d4c1d79ccc6e0ab8 (diff)
downloadgcc-665381933b28226f275d86853b0bbfe96693759b.zip
gcc-665381933b28226f275d86853b0bbfe96693759b.tar.gz
gcc-665381933b28226f275d86853b0bbfe96693759b.tar.bz2
(expand_assignment): Pass to_rtx's mode to expand_expr when assigning a result_decl.
(expand_assignment): Pass to_rtx's mode to expand_expr when assigning a result_decl. (expand_expr): For ERROR_MARK, give back 0 in TMODE if possible. From-SVN: r3784
-rw-r--r--gcc/expr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 8945451..b1d091e 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -2801,7 +2801,7 @@ expand_assignment (to, from, want_value, suggest_reg)
/* Don't move directly into a return register. */
if (TREE_CODE (to) == RESULT_DECL && GET_CODE (to_rtx) == REG)
{
- rtx temp = expand_expr (from, 0, VOIDmode, 0);
+ rtx temp = expand_expr (from, 0, GET_MODE (to_rtx), 0);
emit_move_insn (to_rtx, temp);
preserve_temp_slots (to_rtx);
free_temp_slots ();
@@ -5813,6 +5813,9 @@ expand_expr (exp, target, tmode, modifier)
}
case ERROR_MARK:
+ op0 = CONST0_RTX (tmode);
+ if (op0 != 0)
+ return op0;
return const0_rtx;
default: