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: FYI: PR 5671


I'm checking this in.

This is a modified version of the patch from PR 5671.
I've checked in a new Mauve regression test for this bug.

Tom

Index: ChangeLog
from  Todd Stock  <toddastock@yahoo.com>

	Fix for PR libgcj/5671:
	* verify.cc (state::merge): Handle case where we're merging
	against an interface.

Index: verify.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/verify.cc,v
retrieving revision 1.35
diff -u -r1.35 verify.cc
--- verify.cc 2002/02/07 02:27:10 1.35
+++ verify.cc 2002/02/13 17:11:00
@@ -675,14 +675,19 @@
 		      oldk = oldk->getComponentType ();
 		    }
 
-		  // This loop will end when we hit Object.
-		  while (true)
+		  // Ordinarily this terminates when we hit Object...
+		  while (k != NULL)
 		    {
 		      if (is_assignable_from_slow (k, oldk))
 			break;
 		      k = k->getSuperclass ();
 		      changed = true;
 		    }
+		  // ... but K could have been an interface, in which
+		  // case we'll end up here.  We just convert this
+		  // into Object.
+		  if (k == NULL)
+		    k = &java::lang::Object::class$;
 
 		  if (changed)
 		    {


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