diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-25 09:25:31 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-25 09:25:31 +0000 |
commit | 56b6162a22ea99a41cf8c191fdb50e9d312da4e0 (patch) | |
tree | bbfdaaa82e453add21d85aa34d890ccf7a05c2e9 | |
parent | 26329eb4d9bde175da758d2a12c44e2e0b6f5008 (diff) |
* search.c (is_subobject_of_p_1): Fix thinko.
(lookup_field_queue_p): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59455 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/search.c | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a2feb543b98..bdda5b04c7a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2002-11-25 Mark Mitchell <mark@codesourcery.com> + + * search.c (is_subobject_of_p_1): Fix thinko. + (lookup_field_queue_p): Likewise. + 2002-11-24 Mark Mitchell <mark@codesourcery.com> * class.c (layout_class_type): Reuse tail padding when laying out diff --git a/gcc/cp/search.c b/gcc/cp/search.c index 4170c161ca7..fefd11b8b16 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -1116,7 +1116,7 @@ is_subobject_of_p_1 (parent, binfo, most_derived) binfos = BINFO_BASETYPES (binfo); n_baselinks = binfos ? TREE_VEC_LENGTH (binfos) : 0; - /* Iterate the base types. */ + /* Iterate through the base types. */ for (i = 0; i < n_baselinks; i++) { tree base_binfo = TREE_VEC_ELT (binfos, i); @@ -1132,7 +1132,7 @@ is_subobject_of_p_1 (parent, binfo, most_derived) if (TREE_VIA_VIRTUAL (base_binfo)) { if (CLASSTYPE_MARKED4 (base_type)) - return 0; + continue; SET_CLASSTYPE_MARKED4 (base_type); base_binfo = binfo_for_vbase (base_type, most_derived); } @@ -1202,11 +1202,12 @@ lookup_field_queue_p (binfo, data) /* If this base class is hidden by the best-known value so far, we don't need to look. */ + binfo = CANONICAL_BINFO (binfo, lfi->type); if (!lfi->from_dep_base_p && lfi->rval_binfo && is_subobject_of_p (binfo, lfi->rval_binfo, lfi->type)) return NULL_TREE; - return CANONICAL_BINFO (binfo, lfi->type); + return binfo; } /* Within the scope of a template class, you can refer to the to the |