This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug java/12857] Illegal method modifier when loading a generated .class
- From: "jsturm at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Nov 2003 05:29:40 -0000
- Subject: [Bug java/12857] Illegal method modifier when loading a generated .class
- References: <20031031141021.12857.yves.martin@elca.ch>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From jsturm at gcc dot gnu dot org 2003-11-15 05:29 -------
(In reply to comment #4)
> Jeff, how did the testing go?
I get a miscompilation of java.io.ObjectStreamClass during bootstrap,
introducing 10 new Mauve failures. The .class file is created with fields in
the exact opposite of their declared order.
The cause is a bit surprising to me. On the surface the source parser looks as
though it would be reentrant, but it is not. Moving build_dot_class_method to
pass 1 causes load_class to be used, which may invoke the parser again (though
only during bootstrap when some class files are not available).
So java_reorder_fields is called prematurely on java.io.ObjectStreamClass, when
no fields are yet defined.
Should be fixable by either:
1) Moving build_dot_class_method back to pass 2 (patch_incomplete_class_ref), or
2) Modifying build_dot_class_method to not invoke load_class.
Overall I'm inclined to attempt 2), since the creation of 'class$' may occur in
an anonymous class, and all other inner classes are created in pass 1.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |aph at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12857