===================================================================
@@ -7607,14 +7607,15 @@ build_vtbl_initializer (tree binfo,
ix--)
{
int j;
- int new_position = TARGET_VTABLE_DATA_ENTRY_DISTANCE * ix;
+ int new_position = (TARGET_VTABLE_DATA_ENTRY_DISTANCE * ix
+ + (TARGET_VTABLE_DATA_ENTRY_DISTANCE - 1));
VEC_replace (constructor_elt, vid.inits, new_position, e);
for (j = 1; j < TARGET_VTABLE_DATA_ENTRY_DISTANCE; ++j)
{
- constructor_elt *f = VEC_index (constructor_elt, *inits,
- new_position + j);
+ constructor_elt *f = VEC_index (constructor_elt, vid.inits,
+ new_position - j);
f->index = NULL_TREE;
f->value = build1 (NOP_EXPR, vtable_entry_type,
null_pointer_node);