Commit a0a34f94 by Richard Kenner

(expand_return): Set TREE_SIDE_EFFECTS on MODIFY_EXPR.

From-SVN: r5033
parent a5dbd798
...@@ -2337,14 +2337,21 @@ expand_return (retval) ...@@ -2337,14 +2337,21 @@ expand_return (retval)
|| TREE_CODE (TREE_OPERAND (retval_rhs, 2)) == CALL_EXPR)) || TREE_CODE (TREE_OPERAND (retval_rhs, 2)) == CALL_EXPR))
{ {
rtx label = gen_label_rtx (); rtx label = gen_label_rtx ();
tree expr;
do_jump (TREE_OPERAND (retval_rhs, 0), label, NULL_RTX); do_jump (TREE_OPERAND (retval_rhs, 0), label, NULL_RTX);
expand_return (build (MODIFY_EXPR, TREE_TYPE (current_function_decl), expr = build (MODIFY_EXPR, TREE_TYPE (current_function_decl),
DECL_RESULT (current_function_decl), DECL_RESULT (current_function_decl),
TREE_OPERAND (retval_rhs, 1))); TREE_OPERAND (retval_rhs, 1));
TREE_SIDE_EFFECTS (expr) = 1;
expand_return (expr);
emit_label (label); emit_label (label);
expand_return (build (MODIFY_EXPR, TREE_TYPE (current_function_decl),
DECL_RESULT (current_function_decl), expr = build (MODIFY_EXPR, TREE_TYPE (current_function_decl),
TREE_OPERAND (retval_rhs, 2))); DECL_RESULT (current_function_decl),
TREE_OPERAND (retval_rhs, 2));
TREE_SIDE_EFFECTS (expr) = 1;
expand_return (expr);
return; return;
} }
......
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