diff options
Diffstat (limited to 'contrib/gcc/cp/init.c')
-rw-r--r-- | contrib/gcc/cp/init.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/contrib/gcc/cp/init.c b/contrib/gcc/cp/init.c index 279e3b1..83a8753 100644 --- a/contrib/gcc/cp/init.c +++ b/contrib/gcc/cp/init.c @@ -880,18 +880,10 @@ construct_virtual_base (tree vbase, tree arguments) constructing virtual bases, then we must be the most derived class. Therefore, we don't have to look up the virtual base; we already know where it is. */ - exp = build (PLUS_EXPR, - TREE_TYPE (current_class_ptr), - current_class_ptr, - fold (build1 (NOP_EXPR, TREE_TYPE (current_class_ptr), - BINFO_OFFSET (vbase)))); - exp = build1 (NOP_EXPR, - build_pointer_type (BINFO_TYPE (vbase)), - exp); - exp = build1 (INDIRECT_REF, BINFO_TYPE (vbase), exp); - - expand_aggr_init_1 (vbase, current_class_ref, exp, - arguments, LOOKUP_COMPLAIN); + exp = convert_to_base_statically (current_class_ref, vbase); + + expand_aggr_init_1 (vbase, current_class_ref, exp, arguments, + LOOKUP_COMPLAIN); finish_compound_stmt (/*has_no_scope=*/1, compound_stmt); finish_then_clause (inner_if_stmt); finish_if_stmt (); |