diff options
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r-- | gcc/cp/call.c | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 1678ed2..072fbe6 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -4276,12 +4276,11 @@ tree convert_for_arg_passing (type, val) tree type, val; { + if (val == error_mark_node) + ; /* Pass classes with copy ctors by invisible reference. */ - if (TREE_ADDRESSABLE (type)) - { - val = build1 (ADDR_EXPR, build_reference_type (type), val); - ADDR_IS_INVISIREF (val) = 1; - } + else if (TREE_ADDRESSABLE (type)) + val = build1 (ADDR_EXPR, build_reference_type (type), val); else if (PROMOTE_PROTOTYPES && INTEGRAL_TYPE_P (type) && TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node)) @@ -4289,24 +4288,6 @@ convert_for_arg_passing (type, val) return val; } -/* Convert VALUE for assignment into inlined parameter PARM. */ - -tree -cp_convert_parm_for_inlining (parm, value, fn) - tree parm, value; - tree fn ATTRIBUTE_UNUSED; -{ - /* When inlining, we don't need to mess with invisible references, so - undo the ADDR_EXPR. */ - if (TREE_ADDRESSABLE (TREE_TYPE (parm))) - { - value = TREE_OPERAND (value, 0); - if (TREE_CODE (value) != TARGET_EXPR) - abort (); - } - return value; -} - /* Subroutine of the various build_*_call functions. Overload resolution has chosen a winning candidate CAND; build up a CALL_EXPR accordingly. ARGS is a TREE_LIST of the unconverted arguments to the call. FLAGS is a @@ -4477,12 +4458,12 @@ build_over_call (cand, args, flags) temp or an INIT_EXPR otherwise. */ if (integer_zerop (TREE_VALUE (args))) { - if (! real_lvalue_p (arg)) + if (TREE_CODE (arg) == TARGET_EXPR) return arg; else if (TYPE_HAS_TRIVIAL_INIT_REF (DECL_CONTEXT (fn))) return build_target_expr_with_type (arg, DECL_CONTEXT (fn)); } - else if (!real_lvalue_p (arg) + else if (TREE_CODE (arg) == TARGET_EXPR || TYPE_HAS_TRIVIAL_INIT_REF (DECL_CONTEXT (fn))) { tree address; |