aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java/parse.y')
-rw-r--r--gcc/java/parse.y6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index d117368..b68eb15 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -10793,7 +10793,11 @@ patch_invoke (patch, method, args)
is NULL. */
if (check != NULL_TREE)
{
- patch = build (COMPOUND_EXPR, TREE_TYPE (patch), check, patch);
+ /* We have to call force_evaluation_order now because creating a
+ COMPOUND_EXPR wraps the arg list in a way that makes it
+ unrecognizable by force_evaluation_order later. Yuk. */
+ patch = build (COMPOUND_EXPR, TREE_TYPE (patch), check,
+ force_evaluation_order (patch));
TREE_SIDE_EFFECTS (patch) = 1;
}