+2006-11-27 Mark Mitchell <mark@codesourcery.com>
+
+ * class.c (build_vcall_offset_vtbl_entries): Do not add vcall
+ entries for a primary construction virtual table.
+
2006-11-26 Mark Mitchell <mark@codesourcery.com>
PR c++/29886
/* We only need these entries if this base is a virtual base. We
compute the indices -- but do not add to the vtable -- when
building the main vtable for a class. */
- if (BINFO_VIRTUAL_P (binfo) || binfo == TYPE_BINFO (vid->derived))
+ if (binfo == TYPE_BINFO (vid->derived)
+ || (BINFO_VIRTUAL_P (binfo)
+ /* If BINFO is RTTI_BINFO, then (since BINFO does not
+ correspond to VID->DERIVED), we are building a primary
+ construction virtual table. Since this is a primary
+ virtual table, we do not need the vcall offsets for
+ BINFO. */
+ && binfo != vid->rtti_binfo))
{
/* We need a vcall offset for each of the virtual functions in this
vtable. For example: