Commit b82ddab4 by Mark Mitchell Committed by Mark Mitchell

search.c (is_subobject_of_p_1): Fix thinko.

	* search.c (is_subobject_of_p_1): Fix thinko.
	(lookup_field_queue_p): Likewise.

From-SVN: r59455
parent 7580b910
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> 2002-11-24 Mark Mitchell <mark@codesourcery.com>
* class.c (layout_class_type): Reuse tail padding when laying out * class.c (layout_class_type): Reuse tail padding when laying out
......
...@@ -1116,7 +1116,7 @@ is_subobject_of_p_1 (parent, binfo, most_derived) ...@@ -1116,7 +1116,7 @@ is_subobject_of_p_1 (parent, binfo, most_derived)
binfos = BINFO_BASETYPES (binfo); binfos = BINFO_BASETYPES (binfo);
n_baselinks = binfos ? TREE_VEC_LENGTH (binfos) : 0; n_baselinks = binfos ? TREE_VEC_LENGTH (binfos) : 0;
/* Iterate the base types. */ /* Iterate through the base types. */
for (i = 0; i < n_baselinks; i++) for (i = 0; i < n_baselinks; i++)
{ {
tree base_binfo = TREE_VEC_ELT (binfos, i); tree base_binfo = TREE_VEC_ELT (binfos, i);
...@@ -1132,7 +1132,7 @@ is_subobject_of_p_1 (parent, binfo, most_derived) ...@@ -1132,7 +1132,7 @@ is_subobject_of_p_1 (parent, binfo, most_derived)
if (TREE_VIA_VIRTUAL (base_binfo)) if (TREE_VIA_VIRTUAL (base_binfo))
{ {
if (CLASSTYPE_MARKED4 (base_type)) if (CLASSTYPE_MARKED4 (base_type))
return 0; continue;
SET_CLASSTYPE_MARKED4 (base_type); SET_CLASSTYPE_MARKED4 (base_type);
base_binfo = binfo_for_vbase (base_type, most_derived); base_binfo = binfo_for_vbase (base_type, most_derived);
} }
...@@ -1202,11 +1202,12 @@ lookup_field_queue_p (binfo, data) ...@@ -1202,11 +1202,12 @@ lookup_field_queue_p (binfo, data)
/* If this base class is hidden by the best-known value so far, we /* If this base class is hidden by the best-known value so far, we
don't need to look. */ don't need to look. */
binfo = CANONICAL_BINFO (binfo, lfi->type);
if (!lfi->from_dep_base_p && lfi->rval_binfo if (!lfi->from_dep_base_p && lfi->rval_binfo
&& is_subobject_of_p (binfo, lfi->rval_binfo, lfi->type)) && is_subobject_of_p (binfo, lfi->rval_binfo, lfi->type))
return NULL_TREE; 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 /* Within the scope of a template class, you can refer to the to the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment