aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/expr.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2006-09-12 19:51:08 +0000
committerTom Tromey <tromey@gcc.gnu.org>2006-09-12 19:51:08 +0000
commitff682191312962bc020b67112b517a98552c70d3 (patch)
tree55f50eaab739555639551359d8206578c2e76bab /gcc/java/expr.c
parent6df7764520213e8621ed0586bfc0c5759e285463 (diff)
downloadgcc-ff682191312962bc020b67112b517a98552c70d3.zip
gcc-ff682191312962bc020b67112b517a98552c70d3.tar.gz
gcc-ff682191312962bc020b67112b517a98552c70d3.tar.bz2
* expr.c (push_value): Always flush quick stack.
From-SVN: r116905
Diffstat (limited to 'gcc/java/expr.c')
-rw-r--r--gcc/java/expr.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index 26cd7da..3cb3db7 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -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.