aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorTodd Stock <toddastock@yahoo.com>2002-02-13 17:12:27 +0000
committerTom Tromey <tromey@gcc.gnu.org>2002-02-13 17:12:27 +0000
commit1eca751e4b101e72ceff75795e8eea74dd514717 (patch)
treec0f6ae581cdce991e23f5e38bee69356eea8eaee /libjava
parent2dbe67bbfacc20d0eccfadc629aef282c23ddfb2 (diff)
downloadgcc-1eca751e4b101e72ceff75795e8eea74dd514717.zip
gcc-1eca751e4b101e72ceff75795e8eea74dd514717.tar.gz
gcc-1eca751e4b101e72ceff75795e8eea74dd514717.tar.bz2
re PR libgcj/5671 (verify.cc problem merging local variables)
2002-02-13 Todd Stock <toddastock@yahoo.com> Fix for PR libgcj/5671: * verify.cc (state::merge): Handle case where we're merging against an interface. From-SVN: r49735
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog6
-rw-r--r--libjava/verify.cc9
2 files changed, 13 insertions, 2 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 99a6b9d..b92b98e 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,9 @@
+2002-02-13 Todd Stock <toddastock@yahoo.com>
+
+ Fix for PR libgcj/5671:
+ * verify.cc (state::merge): Handle case where we're merging
+ against an interface.
+
2002-02-12 Tom Tromey <tromey@redhat.com>
* exception.cc (std::abort): Mark as noreturn.
diff --git a/libjava/verify.cc b/libjava/verify.cc
index 562cfaf..38421f4 100644
--- a/libjava/verify.cc
+++ b/libjava/verify.cc
@@ -675,14 +675,19 @@ private:
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)
{