This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: fix PR 28892
- From: Andrew Haley <aph at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: Java Patch List <java-patches at gcc dot gnu dot org>, Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 30 Aug 2006 18:22:54 +0100
- Subject: Re: RFC: fix PR 28892
- References: <m3sljfqjai.fsf@localhost.localdomain>
Tom Tromey writes:
> PR 28892 involves compiling bytecode which has been run through
> retroweaver. Apparently retroweaver will emit bytecode that
> initializes static final variables in methods other than <clinit>.
> This particular set of constraints doesn't appear to be checked by the
> JDK, meaning that this is bytecode which JDK users can run but which
> we will reject.
>
> I fixed this by removing the checks. Any comments (Andrew?) before I
> check this in?
I'd have made it WONTFIX. Sadly, however, there seems to be no rule
in the specification that forbids final fields being rewritten in
methods other than clinit.
This makes some optimizations harder. I think we need a flag to tell
gcj that what we are compiling may not be Java code. Then we can do
better optimizations when we know that it is.
Andrew.