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
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.
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