PR c++/9054
* class.c (layout_class_type): Set DECL_CONTEXT of type for base.
* dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
From-SVN: r60627
/* Record the base version of the type. */
CLASSTYPE_AS_BASE (t) = base_t;
+ TYPE_CONTEXT (base_t) = t;
}
else
CLASSTYPE_AS_BASE (t) = t;
return 1;
}
+ /* Is it a type used as a base? */
+ if (TYPE_CONTEXT (t) && TREE_CODE (TYPE_CONTEXT (t)) == TREE_CODE (t)
+ && CLASSTYPE_AS_BASE (TYPE_CONTEXT (t)) == t)
+ {
+ dump_child ("bfld", TYPE_CONTEXT (t));
+ return 1;
+ }
+
dump_child ("vfld", TYPE_VFIELD (t));
if (CLASSTYPE_TEMPLATE_SPECIALIZATION(t))
dump_string(di, "spec");