Method call via interface calls wrong method...

Andrew Haley aph@redhat.com
Mon Feb 23 21:01:00 GMT 2004


David Daney writes:
 > I found a bug with GCJ 3.4.0 configured for mipsel-linux and would like 
 > someone to try the same thing on x86-linux to see if it is target dependent.
 > 
 > The bug report is here:
 > 
 > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14231
 > 
 > I think the test case is self explanatory.
Thanks for an excellent test case.
Joy! Another Miranda bug: we mark interfaces as abstract, but Sun
don't. Every interface is implicitly abstract, however.
Try this. Let me know if it fixes your problem.
Andrew.
2004年02月23日 Andrew Haley <aph@redhat.com>
	* class.c (layout_class_methods): Check for CLASS_INTERFACE as
	well as CLASS_ABSTRACT.
Index: class.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/class.c,v
retrieving revision 1.176
diff -p -2 -c -r1.176 class.c
*** class.c	15 Jan 2004 10:24:25 -0000	1.176
--- class.c	23 Feb 2004 20:55:22 -0000
*************** layout_class_methods (tree this_class)
*** 2054,2058 ****
 {
 tree method_decl, dtable_count;
! tree super_class;
 
 if (TYPE_NVIRTUALS (this_class))
--- 2074,2078 ----
 {
 tree method_decl, dtable_count;
! tree super_class, type_name;
 
 if (TYPE_NVIRTUALS (this_class))
*************** layout_class_methods (tree this_class)
*** 2071,2075 ****
 dtable_count = integer_zero_node;
 
! if (CLASS_ABSTRACT (TYPE_NAME (this_class)))
 {
 /* An abstract class can have methods which are declared only in
--- 2091,2096 ----
 dtable_count = integer_zero_node;
 
! type_name = TYPE_NAME (this_class);
! if (CLASS_ABSTRACT (type_name) || CLASS_INTERFACE (type_name))
 {
 /* An abstract class can have methods which are declared only in


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /