[BC] Patch: FYI: fixlet in linker

Tom Tromey tromey@redhat.com
Wed Oct 6 19:33:00 GMT 2004


I'm checking this in on the BC branch.

We didn't properly ensure that Miranda methods for a superclass were
added when we compute our own Miranda methods.  This matters later for
vtable layout.

This allows the pr8823 test case to run again.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>
	* link.cc (ensure_method_table_complete): Ensure superclass
	Miranda methods installed.

Index: link.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/Attic/link.cc,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 link.cc
--- link.cc 6 Oct 2004 00:05:59 -0000 1.1.2.2
+++ link.cc 6 Oct 2004 19:26:50 -0000
@@ -1565,6 +1565,10 @@
 {
   if (klass->vtable != NULL || klass->isInterface())
     return;
+
+  // We need our superclass to have its own Miranda methods installed.
+  wait_for_state (klass->getSuperclass (), JV_STATE_LOADED);
+
   // A class might have so-called "Miranda methods".  This is a method
   // that is declared in an interface and not re-declared in an
   // abstract class.  Some compilers don't emit declarations for such



More information about the Java-patches mailing list