This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug java/12911] Class initialization optimization pessimization
- From: "aph at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 May 2005 13:34:46 -0000
- Subject: [Bug java/12911] Class initialization optimization pessimization
- References: <20031105143639.12911.green@redhat.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From aph at gcc dot gnu dot org 2005-05-03 13:34 -------
I'm tempted to change this to WONTFIX.
The patch for PR java/19285 party fixes this for indirect dispatch: in A.foo2(),
the field B.bar is initialized by a call to _Jv_ResolvePoolEntry, and this is
only called once, the first time A.foo2() is invoked.
Granted, this only applies to the indirect dispatch (a.k.a. the "new ABI") case.
However, optimizing known incorrect behaviour doesn't seem like a good use of
anyone's time.
Because of the binary compatibility rules we can't assume that B.bar will always
be a field of B; it might be a field of one of B's interfaces. Initializing B
won't initialize its interfaces, so this code will fail.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |SUSPENDED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12911