Trunk gcj ICEs on instance variable increment within try block when compiling to native object. (And a try/finally related bug.)

Mark J Roberts mjr@anarcast.net
Thu Aug 9 05:11:00 GMT 2001


Bug Number One
--------------

public class Test {
    int i;
    public void foo() {
        try { i += 1; } catch (Exception e) {}
    }
}

$ gcj -c Test.java
Test.java: In class `Test':
Test.java: In method `Test.foo()':
Test.java:5: Internal compiler error in fixup_abnormal_edges, at reload1.c:9516

The bug also occurs when the try block includes a call to an
exception-throwing method. It does not occur when compiling to bytecode
with -C. gcc version 3.1 20010808 (experimental).

Bug Number Two
--------------

public class Test {
    public static void main(String[] args) throws Exception {
        try { throw new Exception(); } finally {}
    }
}

$ gcj -o test --main=Test Test.java
$ ./test
Aborted (core dumped)

And when I first compile to bytecode with jikes:

$ jikes Test.java
$ gcj -o test --main=Test Test.class
$ ./test

It then enters a busy loop and continuously allocates memory.

Finally, running a jikes-built class file with gij:

$ gij Test.class
Aborted (core dumped)



More information about the Java mailing list