7611 – Internal error while compiling libjava with -O (original) (raw)
internal error while compiling java/io/FilePermission.java whith -O
/home/thomas/gnu/gcc-3.1.1/gcc/gcj -B/home/thomas/gnu/gcc-3.1.1/i686-pc-linux-gnu/libjava/ -B/home/thomas/gnu/gcc-3.1.1/gcc/ --encoding=UTF-8 -C -g1 -O -march=athlon -classpath '' -bootclasspath /home/thomas/gnu/gcc-3.1.1/i686-pc-linux-gnu/libjava:.
-d /home/thomas/gnu/gcc-3.1.1/i686-pc-linux-gnu/libjava java/io/FilePermission.java
java/io/FilePermission.java: In class java.io.FilePermission': java/io/FilePermission.java: In method java.io.FilePermission.equals(java.lang.Object)':
java/io/FilePermission.java:153: internal error in generate_bytecode_insn - tree code not implemented: bit_field_ref
java/io/FilePermission.java:153: internal error in generate_bytecode_insn - tree code not implemented: bit_field_ref
java/io/FilePermission.java:153: confused by earlier errors, bailing out
Release: 3.1.1
Environment: System: Linux pc61 2.4.17 #1 Mon Jan 28 12🔞28 MET 2002 i686 unknown Architecture: i686
host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu configured with: ./configure : ./configure --enable-shared --enable-threads --with-cpu=athlon --enable-languages=c,c++,java --with-system-zlib
How-To-Repeat: set JCFLAGS = -g1 -O -march=athlon in gcc-3.1.1/i686-pc-linux-gnu/libjava/Makefile
Comment 1 tgreve 2002-08-16 04:16:01 UTC
Fix: don't optimize
Comment 2 Tom Tromey 2002-08-16 15:55:43 UTC
From: Tom Tromey <tromey@redhat.com> To: Thomas Greve <tgreve@pc61.ixmid.com> Cc: gcc-gnats@gcc.gnu.org Subject: Re: java/7611: Internal error while compiling libjava with -O Date: 16 Aug 2002 15:55:43 -0600
"Thomas" == Thomas Greve <tgreve@pc61.ixmid.com> writes:
Thomas> java/io/FilePermission.java:153: internal error in generate_bytecode_insn - tree code not implemented: bit_field_ref
The problem here is that gcc will sometimes change a field access into a bit-field access. This happens in the tree-simplification routines (offhand I forget exactly where, but I think there is another PR on this topic). The bytecode back end doesn't understand bit fields, and changing this would be difficult.
I'm surprised to see this happen on x86. Previously I believe it was only a problem on the alpha.
Try building without -O (the .class files are all that matter). That might help.
I once started a patch to add a lang-hook to let `gcj -C' disable this particular optimization. I still have it lying around somewhere but I haven't found the time to test it on my alpha box yet :-(
Tom
Comment 3 Tom Tromey 2002-08-21 17:43:28 UTC
Responsible-Changed-From-To: unassigned->tromey Responsible-Changed-Why: I'm handling this
Comment 4 Tom Tromey 2002-08-21 17:43:28 UTC
State-Changed-From-To: open->closed State-Changed-Why: I checked in a fix for this. If you can try it, please do so and report back. I'm marking this PR as closed; we can reopen it if the problem persists. However, I think it will not.