Commit 591b15bb by Jim Wilson

(expand_increment): Call save_expr on inner expression if

it is itself an increment expression.

From-SVN: r5115
parent 3de13334
......@@ -6940,6 +6940,12 @@ expand_increment (exp, post)
&& (TREE_CODE (TREE_OPERAND (incremented, 0)) != INDIRECT_REF
|| DECL_BIT_FIELD (TREE_OPERAND (incremented, 1)))))
incremented = stabilize_reference (incremented);
/* Nested *INCREMENT_EXPRs can happen in C++. We must force innermost
ones into save exprs so that they don't accidentally get evaluated
more than once by the code below. */
if (TREE_CODE (incremented) == PREINCREMENT_EXPR
|| TREE_CODE (incremented) == PREDECREMENT_EXPR)
incremented = save_expr (incremented);
/* Compute the operands as RTX.
Note whether OP0 is the actual lvalue or a copy of it:
......
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