summaryrefslogtreecommitdiff
path: root/gcc/cp/rtti.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/rtti.c')
-rw-r--r--gcc/cp/rtti.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index e9873ba9718..a5429ecfcc6 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -1640,11 +1640,14 @@ create_pseudo_type_info VPARAMS((const char *real_name, int ident, ...))
/* Under the new ABI, we need to point into the middle of the
vtable. */
- if (vbase_offsets_in_vtable_p ())
+ if (flag_new_abi)
{
- vtable_decl = build (PLUS_EXPR, TREE_TYPE (vtable_decl),
+ vtable_decl = build (PLUS_EXPR,
+ TREE_TYPE (vtable_decl),
vtable_decl,
- size_extra_vtbl_entries (TYPE_BINFO (real_type)));
+ size_binop (MULT_EXPR,
+ size_int (2),
+ TYPE_SIZE_UNIT (vtable_entry_type)));
TREE_CONSTANT (vtable_decl) = 1;
}