aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/parse.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@cygnus.com>2000-05-26 01:16:20 +0000
committerTom Tromey <tromey@gcc.gnu.org>2000-05-26 01:16:20 +0000
commit40aaba2b814b0495d3ef50ccb0b607484c0866e7 (patch)
tree58c0fa37f55303268acf19d77c9006bd457194b8 /gcc/java/parse.c
parentb8c5b1c6d5f519df5f84af86f392495fb90d6b48 (diff)
downloadgcc-40aaba2b814b0495d3ef50ccb0b607484c0866e7.zip
gcc-40aaba2b814b0495d3ef50ccb0b607484c0866e7.tar.gz
gcc-40aaba2b814b0495d3ef50ccb0b607484c0866e7.tar.bz2
re GNATS gcj/162 (gcj does not initialize interfaces according to spec)
* parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC when trying to see if field's class should be initialized. Always initialize field's declaring class, not qualified class. For PR gcj/162. From-SVN: r34182
Diffstat (limited to 'gcc/java/parse.c')
-rw-r--r--gcc/java/parse.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/java/parse.c b/gcc/java/parse.c
index c89c2d2..17b8f23 100644
--- a/gcc/java/parse.c
+++ b/gcc/java/parse.c
@@ -11236,7 +11236,6 @@ resolve_field_access (qual_wfl, field_decl, field_type)
is_static = JDECL_P (decl) && FIELD_STATIC (decl);
if (FIELD_FINAL (decl)
&& JPRIMITIVE_TYPE_P (TREE_TYPE (decl))
- && DECL_LANG_SPECIFIC (decl)
&& DECL_INITIAL (decl))
{
field_ref = DECL_INITIAL (decl);
@@ -11250,7 +11249,7 @@ resolve_field_access (qual_wfl, field_decl, field_type)
return error_mark_node;
if (is_static && !static_final_found
&& !flag_emit_class_files && !flag_emit_xref)
- field_ref = build_class_init (type_found, field_ref);
+ field_ref = build_class_init (DECL_CONTEXT (decl), field_ref);
}
else
field_ref = decl;