diff options
author | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-02-07 19:02:39 +0000 |
---|---|---|
committer | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-02-07 19:02:39 +0000 |
commit | ae272bde5131250f58531c93715a65fab8e48638 (patch) | |
tree | cc429bbca658b2915a15d04fbecf3596b8c31b7d /gcc/java/constants.c | |
parent | 43eca37cb0d3106f3c5fdc8e9e6e6ee07fc3a1f5 (diff) | |
download | ppe42-gcc-ae272bde5131250f58531c93715a65fab8e48638.tar.gz ppe42-gcc-ae272bde5131250f58531c93715a65fab8e48638.zip |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110710 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/constants.c')
-rw-r--r-- | gcc/java/constants.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/java/constants.c b/gcc/java/constants.c index 98a05043e47..5d2f6785356 100644 --- a/gcc/java/constants.c +++ b/gcc/java/constants.c @@ -1,5 +1,5 @@ /* Handle the constant pool of the Java(TM) Virtual Machine. - Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of GCC. @@ -480,7 +480,15 @@ build_constants_constructor (void) case CONSTANT_Fieldref: case CONSTANT_NameAndType: { - jword temp = outgoing_cpool->data[i].w; + unsigned HOST_WIDE_INT temp = outgoing_cpool->data[i].w; + + /* Make sure that on a 64-bit big-endian machine this + 32-bit jint appears in the first word. + FIXME: This is a kludge. The field we're initializing is + not a scalar but a union, and that's how we should + represent it in the compiler. We should fix this. */ + if (BYTES_BIG_ENDIAN && BITS_PER_WORD > 32) + temp <<= BITS_PER_WORD - 32; tags_list = tree_cons (NULL_TREE, |