]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* expr.c (push_value): Always flush quick stack.
authorTom Tromey <tromey@redhat.com>
Tue, 12 Sep 2006 19:51:08 +0000 (19:51 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Tue, 12 Sep 2006 19:51:08 +0000 (19:51 +0000)
From-SVN: r116905

gcc/java/ChangeLog
gcc/java/expr.c

index af1c42b12e457a966bf5df72fabf9e08b1e1c73f..756fbcf7e4274368935ff24a8f15f70eb37ddb63 100644 (file)
@@ -1,3 +1,7 @@
+2006-09-12  Tom Tromey  <tromey@redhat.com>
+
+       * expr.c (push_value): Always flush quick stack.
+
 2006-09-12  Tom Tromey  <tromey@redhat.com>
 
        PR java/29013:
index 26cd7da5078935e5821acde7f36184b350cce50e..3cb3db7bb2c00c3e3a1515ed95e1d071493c2dfb 100644 (file)
@@ -301,6 +301,13 @@ push_value (tree value)
       TREE_CHAIN (node) = quick_stack;
       quick_stack = node;
     }
+  /* If the value has a side effect, then we need to evaluate it
+     whether or not the result is used.  If the value ends up on the
+     quick stack and is then popped, this won't happen -- so we flush
+     the quick stack.  It is safest to simply always flush, though,
+     since TREE_SIDE_EFFECTS doesn't capture COMPONENT_REF, and for
+     the latter we may need to strip conversions.  */
+  flush_quick_stack ();
 }
 
 /* Pop a type from the type stack.