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.y10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index ef87024..efa0912 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -9742,10 +9742,14 @@ patch_unaryop (node, wfl_op)
/* 15.14.2 Prefix Decrement Operator -- */
case PREDECREMENT_EXPR:
decl = strip_out_static_field_access_decl (op);
+ /* We really should have a JAVA_ARRAY_EXPR to avoid this */
if (!JDECL_P (decl)
- && !((TREE_CODE (decl) == INDIRECT_REF
- || TREE_CODE (decl) == COMPONENT_REF)
- && JPRIMITIVE_TYPE_P (TREE_TYPE (decl))))
+ && TREE_CODE (decl) != COMPONENT_REF
+ && !(flag_emit_class_files && TREE_CODE (decl) == ARRAY_REF)
+ && TREE_CODE (decl) != INDIRECT_REF
+ && !(TREE_CODE (decl) == COMPOUND_EXPR
+ && TREE_OPERAND (decl, 1)
+ && (TREE_CODE (TREE_OPERAND (decl, 1)) == INDIRECT_REF)))
{
tree lvalue;
/* Before screaming, check that we're not in fact trying to