Bug 26720 - Can't find method 'access$1(I)'
Can't find method 'access$1(I)'
Status: RESOLVED FIXED
Product: gcc
Classification: Unclassified
Component: java
4.1.0
: P3 normal
: 4.3.0
Assigned To: Not yet assigned to anyone
:
Depends on: 28067
Blocks:
  Show dependency treegraph
 
Reported: 2006-03-16 18:35 UTC by Shaun Jackman
Modified: 2007-01-09 20:48 UTC (History)
3 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2006-03-17 15:28:24


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shaun Jackman 2006-03-16 18:35:51 UTC
In the following test, gcj fails to generate an access method for the private static members of type char, byte, and short, although it does generate the access method for the private static members of type int and Object.

class AccessTest {
       public interface Foo {
               public void foo();
       }

       private static char buggy_char;
       private static byte buggy_byte;
       private static short buggy_short;
       private static int i;
       private static Object o;

       static {
               new Foo() {
                       public void foo() {
                               buggy_char = 0;
                               buggy_byte = 0;
                               buggy_short = 0;
                               i = 0;
                               o = null;
                       }
               };
       }
}
Comment 1 Tom Tromey 2006-03-17 18:01:14 UTC
The bug here is that the code that handles assignments
requiring an accessor method does not understand that
a constant might be subject to a narrowing constant conversion.
Hence it does not (e.g.) convert '0' to '(byte) 0', and
thus the accessor method is not found.
Comment 2 Tom Tromey 2006-03-17 18:06:31 UTC
One potential fix is to call try_builtin_assignconv
in nested_field_access_fix or the like.
I haven't tried this.
Comment 3 Tom Tromey 2007-01-09 20:48:29 UTC
All gcj front end bugs have been fixed by the gcj-eclipse branch merge.
I'm mass-closing the affected PRs.
If you believe one of these was closed in error, please reopen it
with a note explaining why.
Thanks.