re PR libgcj/8945 (StringTokenizer)
authorAndrew Haley <aph@redhat.com>
Thu, 19 Dec 2002 06:43:12 +0000 (06:43 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Thu, 19 Dec 2002 06:43:12 +0000 (06:43 +0000)
2002-12-18  Andrew Haley  <aph@redhat.com>

* parse.y (patch_invoke): Force evaluation order when `check' is
set.  For PR libgcj/8945.

From-SVN: r60290

gcc/java/ChangeLog
gcc/java/parse.y

index bed6fdc5f146ad2e3641165ba95996f09258ce49..3b6cf6c8c3c85181cc39706564f451fc40b92958 100644 (file)
@@ -1,3 +1,8 @@
+2002-12-18  Andrew Haley  <aph@redhat.com>
+
+       * parse.y (patch_invoke): Force evaluation order when `check' is
+       set.  For PR libgcj/8945.
+
 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
 
        * gcj.texi: Change version number to 3.4.
index d117368445f96b46bbc91e60c207c38782dfaf18..b68eb158ab6b58600023ae42f101387c0e2d7d8c 100644 (file)
@@ -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;
     }