RFC: fix PR 28892

Andrew Haley aph@redhat.com
Wed Aug 30 18:47:00 GMT 2006


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.



More information about the Gcc-patches mailing list