This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: PR 5671
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 13 Feb 2002 10:35:12 -0700
- Subject: Patch: FYI: PR 5671
- Reply-to: tromey at redhat dot com
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)
{