parse.y (java_complete_lhs): Call force_evaluation_order after patch_newarray.
x * parse.y (java_complete_lhs): Call force_evaluation_order after patch_newarray. (patch_binop): Don't call fold if there are side effects. From-SVN: r25807
This commit is contained in:
parent
aee48ef856
commit
4fdea7b0d1
@ -10491,7 +10491,8 @@ java_complete_lhs (node)
|
||||
/* They complete the array creation expression, if no errors
|
||||
were found. */
|
||||
CAN_COMPLETE_NORMALLY (node) = 1;
|
||||
return (flag ? error_mark_node : patch_newarray (node));
|
||||
return (flag ? error_mark_node
|
||||
: force_evaluation_order (patch_newarray (node)));
|
||||
|
||||
case NEW_CLASS_EXPR:
|
||||
case CALL_EXPR:
|
||||
@ -11870,7 +11871,10 @@ patch_binop (node, wfl_op1, wfl_op2)
|
||||
TREE_TYPE (node) = prom_type;
|
||||
TREE_SIDE_EFFECTS (node) = TREE_SIDE_EFFECTS (op1) | TREE_SIDE_EFFECTS (op2);
|
||||
|
||||
return fold (node);
|
||||
/* fold does not respect side-effect order as required for Java but not C. */
|
||||
if (! TREE_SIDE_EFFECTS (node))
|
||||
node = fold (node);
|
||||
return node;
|
||||
}
|
||||
|
||||
/* Concatenate the STRING_CST CSTE and STRING. When AFTER is a non
|
||||
|
Loading…
Reference in New Issue
Block a user