aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/class.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java/class.c')
-rw-r--r--gcc/java/class.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/java/class.c b/gcc/java/class.c
index c4283ce65b8..2457ccca29d 100644
--- a/gcc/java/class.c
+++ b/gcc/java/class.c
@@ -1055,8 +1055,7 @@ build_static_field_ref (tree fdecl)
However, currently sometimes gcj is too eager and will end up
returning the field itself, leading to an incorrect external
reference being generated. */
- if ((is_compiled
- && (! flag_indirect_dispatch || current_class == fclass))
+ if ((is_compiled && !flag_indirect_dispatch)
|| (FIELD_FINAL (fdecl) && DECL_INITIAL (fdecl) != NULL_TREE
&& (JSTRING_TYPE_P (TREE_TYPE (fdecl))
|| JNUMERIC_TYPE_P (TREE_TYPE (fdecl)))
@@ -1275,7 +1274,7 @@ make_field_value (tree fdecl)
? TREE_CHAIN (TYPE_FIELDS (field_info_union_node))
: TYPE_FIELDS (field_info_union_node)),
(FIELD_STATIC (fdecl)
- ? build_address_of (build_static_field_ref (fdecl))
+ ? build_address_of (fdecl)
: byte_position (fdecl)))));
FINISH_RECORD_CONSTRUCTOR (finit);