------- 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