[Bug java/19870] New: gcj -C compiled code accessing private fields of inner classes from outer class give IllegalAccessError

mark at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Feb 10 00:26:00 GMT 2005


The following compiled with jikes outputs 42.
Compiled with gcj -C and ran with gij gives a java.lang.IllegalAccessError

public class A
{
  public static class B
  {
    private static int i = 42;
  }

  public static void main(String[] args)
  {
    System.out.println(B.i);
  }
}

-- 
           Summary: gcj -C compiled code accessing private fields of inner
                    classes from outer class give IllegalAccessError
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mark at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org
OtherBugsDependingO 18131
             nThis:


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19870



More information about the Java-prs mailing list