diff options
author | Todd Stock <toddastock@yahoo.com> | 2002-02-13 17:12:27 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2002-02-13 17:12:27 +0000 |
commit | 1eca751e4b101e72ceff75795e8eea74dd514717 (patch) | |
tree | c0f6ae581cdce991e23f5e38bee69356eea8eaee /libjava/verify.cc | |
parent | 2dbe67bbfacc20d0eccfadc629aef282c23ddfb2 (diff) | |
download | gcc-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/verify.cc')
-rw-r--r-- | libjava/verify.cc | 9 |
1 files changed, 7 insertions, 2 deletions
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) { |