diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-02-13 17:12:27 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-02-13 17:12:27 +0000 |
commit | 598fc2ad32b88d280beff659ded19eb41b145f0c (patch) | |
tree | c0f6ae581cdce991e23f5e38bee69356eea8eaee /libjava/verify.cc | |
parent | 568b91107cb9a120a116eaf59285f111da7a1f24 (diff) | |
download | gcc-598fc2ad32b88d280beff659ded19eb41b145f0c.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49735 138bc75d-0d04-0410-961f-82ee72b054a4
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 562cfaf5bc3..38421f46ad6 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) { |