aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/expr.c
diff options
context:
space:
mode:
authorAndrew Haley <aph@redhat.com>2006-02-07 19:02:39 +0000
committerAndrew Haley <aph@gcc.gnu.org>2006-02-07 19:02:39 +0000
commit0920886f9fee2306409279e222b71d858f9f86bf (patch)
treecc429bbca658b2915a15d04fbecf3596b8c31b7d /gcc/java/expr.c
parent7935dc1bc3c1e806da0f6d2be8d9eae8dd0bdb08 (diff)
downloadgcc-0920886f9fee2306409279e222b71d858f9f86bf.zip
gcc-0920886f9fee2306409279e222b71d858f9f86bf.tar.gz
gcc-0920886f9fee2306409279e222b71d858f9f86bf.tar.bz2
re PR java/25535 (gcj broken on 64-bit big-endian systems)
2006-02-07 Andrew Haley <aph@redhat.com> * expr.c (expand_invoke): (BC mode.) If we find a method in a class other than the one in which we expected to find it, ignore the result. PR java/25535 * constants.c (build_constants_constructor): move initializer into first halfword on a 6-bit big-endian machine. From-SVN: r110710
Diffstat (limited to 'gcc/java/expr.c')
-rw-r--r--gcc/java/expr.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index 5e7699b..52f7e48 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -2271,6 +2271,17 @@ expand_invoke (int opcode, int method_ref_index, int nargs ATTRIBUTE_UNUSED)
else
method = lookup_java_method (self_type, method_name, method_signature);
+ /* We've found a method in a class other than the one in which it
+ was wanted. This can happen if, for instance, we're trying to
+ compile invokespecial super.equals().
+ FIXME: This is a kludge. Rather than nullifying the result, we
+ should change lookup_java_method() so that it doesn't search the
+ superclass chain when we're BC-compiling. */
+ if (! flag_verify_invocations
+ && method
+ && self_type != DECL_CONTEXT (method))
+ method = NULL_TREE;
+
/* We've found a method in an interface, but this isn't an interface
call. */
if (opcode != OPCODE_invokeinterface