aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/check-init.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2004-12-09 13:44:15 +0000
committerJakub Jelinek <jakub@redhat.com>2004-12-09 13:44:15 +0000
commitf650a7669ffc003536e3e4f1bdbf8ee2632cdc12 (patch)
tree866b796563fe9040efe0422f747289dd8bc814b2 /gcc/java/check-init.c
parent1d1ce00e42bafecf0c3c04218bbda5c1f23046fc (diff)
cvs update -Pd -jgcc-3_4-branch:2004{1208,1209}
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-3_4-rhl-branch@91948 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/check-init.c')
-rw-r--r--gcc/java/check-init.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/java/check-init.c b/gcc/java/check-init.c
index c4e39484410..454aca5e19b 100644
--- a/gcc/java/check-init.c
+++ b/gcc/java/check-init.c
@@ -164,6 +164,11 @@ static void check_final_reassigned (tree, words);
static tree
get_variable_decl (tree exp)
{
+ /* A static field can be wrapped in a COMPOUND_EXPR where the first
+ argument initializes the class. */
+ if (TREE_CODE (exp) == COMPOUND_EXPR)
+ exp = extract_field_decl (exp);
+
if (TREE_CODE (exp) == VAR_DECL)
{
if (! TREE_STATIC (exp) || FIELD_FINAL (exp))