calls.c (expand_call): Don't try to be clever about expanding the return slot address.
authorJason Merrill <jason@redhat.com>
Wed, 18 Dec 2002 05:57:43 +0000 (00:57 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 18 Dec 2002 05:57:43 +0000 (00:57 -0500)
        * calls.c (expand_call): Don't try to be clever about expanding
        the return slot address.

From-SVN: r60234

gcc/ChangeLog
gcc/calls.c

index 6014d21..52a4c88 100644 (file)
@@ -1,3 +1,11 @@
+2002-12-17  Jason Merrill  <jason@redhat.com>
+
+       * calls.c (expand_call): Don't try to be clever about expanding
+       the return slot address.
+
+       * calls.c (expand_call): Handle CALL_EXPR_HAS_RETURN_SLOT_ADDR
+       with special struct-return ABIs.
+
 2002-12-18  Kaz kojima  <kkojima@gcc.gnu.org>
 
        * config/sh/linux.h (NO_IMPLICIT_EXTERN_C, CPLUSPLUS_CPP_SPEC):
index 09398e8..2be53a8 100644 (file)
@@ -2249,18 +2249,13 @@ expand_call (exp, target, ignore)
 
        if (CALL_EXPR_HAS_RETURN_SLOT_ADDR (exp))
          {
-           /* 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);
-             }
+           /* The structure value address arg is already in actparms.
+              Pull it out.  It might be nice to just leave it there, but
+              we need to set structure_value_addr.  */
+           tree return_arg = TREE_VALUE (actparms);
+           actparms = TREE_CHAIN (actparms);
+           structure_value_addr = expand_expr (return_arg, NULL_RTX,
+                                               VOIDmode, EXPAND_NORMAL);
          }
        else if (target && GET_CODE (target) == MEM)
          structure_value_addr = XEXP (target, 0);