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.y7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index 4032409..c0b9100 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -7546,7 +7546,7 @@ maybe_generate_pre_expand_clinit (class_type)
}
/* Analyzes a method body and look for something that isn't a
- MODIFY_EXPR. */
+ MODIFY_EXPR with a constant value. */
static int
analyze_clinit_body (bbody)
@@ -7570,11 +7570,10 @@ analyze_clinit_body (bbody)
break;
case MODIFY_EXPR:
- bbody = NULL_TREE;
- break;
+ /* Return 0 if the operand is constant, 1 otherwise. */
+ return ! TREE_CONSTANT (TREE_OPERAND (bbody, 1));
default:
- bbody = NULL_TREE;
return 1;
}
return 0;