This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Trunk gcj ICEs on instance variable increment within try block when compiling to native object. (And a try/finally related bug.)
- To: java at gcc dot gnu dot org
- Subject: Trunk gcj ICEs on instance variable increment within try block when compiling to native object. (And a try/finally related bug.)
- From: Mark J Roberts <mjr at anarcast dot net>
- Date: Thu, 9 Aug 2001 02:17:26 -0500
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)