aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2004-11-10 21:49:44 +0000
committerTom Tromey <tromey@redhat.com>2004-11-10 21:49:44 +0000
commit470444c3d5bcf6ed39ad119582e0c7f56d2c468b (patch)
tree82516a6ad400705fd5d6c7f3475b8c727a148d9f
parentbe01c2eb27a358d17d2394dca6aa56f58d05f1b0 (diff)
* class.c (make_field_value): Don't call build_static_field_ref.
(build_static_field_ref): Don't emit direct references when using indirect dispatch. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcj-abi-2-dev-branch@90455 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/java/ChangeLog4
-rw-r--r--gcc/java/class.c5
2 files changed, 6 insertions, 3 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index fbb696d2c90..e4a112a4296 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,5 +1,9 @@
2004-11-10 Tom Tromey <tromey@redhat.com>
+ * class.c (make_field_value): Don't call build_static_field_ref.
+ (build_static_field_ref): Don't emit direct references when using
+ indirect dispatch.
+
* gcj.texi (Invoking gij): Document -verbose. Put -verbose and
-verbose:class into man page synopsis.
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);