This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: RFA: PR java/15710


PR 15710 occurs because we try to add Miranda methods before ensuring
that all our superinterfaces are loaded.

This patch fixes the problem by forcing each superinterface to be
loaded at the appropriate moment.  I don't really understand the class
loading strategy in gcj; I looked around and it seems that we have
similar ad hoc load_class calls elsewhere, so this is what I did.

Tested on x86 FC2 including mauve and jacks.  No regressions.

Ok?

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	PR java/15710:
	* class.c (add_miranda_methods): Load superinterface if not
	already loaded.

Index: class.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/class.c,v
retrieving revision 1.207
diff -u -r1.207 class.c
--- class.c 14 Sep 2004 01:50:12 -0000 1.207
+++ class.c 28 Sep 2004 16:21:48 -0000
@@ -2124,6 +2124,8 @@
       tree elt = BINFO_TYPE (base_binfo);
 
       /* Ensure that interface methods are seen in declared order.  */
+      if (!CLASS_LOADED_P (elt))
+	load_class (elt, 1);
       layout_class_methods (elt);
 
       /* All base classes will have been laid out at this point, so the order 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]