Commit 66538193 by Richard Stallman

(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
parent 70a73141
...@@ -2801,7 +2801,7 @@ expand_assignment (to, from, want_value, suggest_reg) ...@@ -2801,7 +2801,7 @@ expand_assignment (to, from, want_value, suggest_reg)
/* Don't move directly into a return register. */ /* Don't move directly into a return register. */
if (TREE_CODE (to) == RESULT_DECL && GET_CODE (to_rtx) == REG) 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); emit_move_insn (to_rtx, temp);
preserve_temp_slots (to_rtx); preserve_temp_slots (to_rtx);
free_temp_slots (); free_temp_slots ();
...@@ -5813,6 +5813,9 @@ expand_expr (exp, target, tmode, modifier) ...@@ -5813,6 +5813,9 @@ expand_expr (exp, target, tmode, modifier)
} }
case ERROR_MARK: case ERROR_MARK:
op0 = CONST0_RTX (tmode);
if (op0 != 0)
return op0;
return const0_rtx; return const0_rtx;
default: default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment