This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Static array length access bug in gcj


Title: Static array length access bug in gcj

Hello:

I get a compiler error when I try the following. Any ideas?
Anand

::::::::::::::
A.java
::::::::::::::
public class A {
   public static String[] strArr = { "A", "B", "C" };
}
::::::::::::::
B.java
::::::::::::::
import java.lang.*;
import java.util.*;

public class B {
   public static void main ( String[] args ) {
        int length = A.strArr.length;
        System.out.println ( "Array length: " + length );
   }
}

$ gcj --main=B A.java B.java
B.java:6: Internal compiler error:
B.java:6: Internal compiler error in `expand_expr', at expr.c:5750
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.

[anandkr@crchy0n9 test]$ gcj -v
Reading specs from /opt/lib/gcc-lib/powerpc-unknown-linux-gnu/2.95.1/specs
Reading specs from /opt/lib/libgcj.spec
rename spec lib to liborig
gcc version 2.95.1 19990816 (release)

Anand Krishnaswamy
Wireless Solutions, e-mobility HLR
Phone: (972) 684-7414 or ESN 444-7414
Fax    : (972) 684-3739 or ESN 444-3739
E-mail : anandkr@nortelnetworks.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]