calls.c (expand_call): Handle CALL_EXPR_HAS_RETURN_SLOT_ADDR with special struct-return ABIs.

* calls.c (expand_call): Handle CALL_EXPR_HAS_RETURN_SLOT_ADDR
        with special struct-return ABIs.

cp/
        * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
        of the CALL_EXPR.

From-SVN: r60223
This commit is contained in:
Jason Merrill 2002-12-17 16:29:29 -05:00 committed by Jason Merrill
parent e489a31f89
commit 89ea02fbac
3 changed files with 20 additions and 10 deletions

View File

@ -2248,8 +2248,20 @@ expand_call (exp, target, ignore)
struct_value_size = int_size_in_bytes (TREE_TYPE (exp));
if (CALL_EXPR_HAS_RETURN_SLOT_ADDR (exp))
/* The structure value address arg is already in actparms. */
structure_value_addr_parm = 1;
{
/* The structure value address arg is already in actparms. */
if (struct_value_rtx == 0)
/* We want to pass it as a normal argument, so leave it. */
structure_value_addr_parm = 1;
else
{
/* We want to pass it in a special location. */
tree return_arg = TREE_VALUE (actparms);
actparms = TREE_CHAIN (actparms);
structure_value_addr = expand_expr (return_arg, struct_value_rtx,
VOIDmode, EXPAND_NORMAL);
}
}
else if (target && GET_CODE (target) == MEM)
structure_value_addr = XEXP (target, 0);
else

View File

@ -1,5 +1,8 @@
2002-12-16 Jason Merrill <jason@redhat.com>
* semantics.c (simplify_aggr_init_exprs_r): Don't change the type
of the CALL_EXPR.
* semantics.c (do_pushlevel): Call pushlevel after adding the
SCOPE_STMT.
(do_poplevel): Call poplevel before adding the SCOPE_STMT.

View File

@ -2250,14 +2250,9 @@ simplify_aggr_init_exprs_r (tp, walk_subtrees, data)
TREE_SIDE_EFFECTS (call_expr) = 1;
if (style == arg)
{
/* Tell the backend that we've added our return slot to the argument
list. */
CALL_EXPR_HAS_RETURN_SLOT_ADDR (call_expr) = 1;
/* And don't let anyone use the value of the call directly in a
larger expression. */
TREE_TYPE (call_expr) = void_type_node;
}
/* Tell the backend that we've added our return slot to the argument
list. */
CALL_EXPR_HAS_RETURN_SLOT_ADDR (call_expr) = 1;
else if (style == pcc)
{
/* If we're using the non-reentrant PCC calling convention, then we