function.c (expand_function_start): Set DECL_REGISTER on a pseudo used for DECL_RESULT.
authorRichard Henderson <rth@redhat.com>
Wed, 28 Mar 2001 03:28:28 +0000 (19:28 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 28 Mar 2001 03:28:28 +0000 (19:28 -0800)
        * function.c (expand_function_start): Set DECL_REGISTER on
        a pseudo used for DECL_RESULT.

From-SVN: r40896

gcc/ChangeLog
gcc/function.c

index 6d8d1152e076abb400633a19d9104eb77918afa2..0f24eae0065c356ee49d7c46eb1900e62435c858 100644 (file)
@@ -1,3 +1,8 @@
+2001-03-27  Richard Henderson  <rth@redhat.com>
+
+       * function.c (expand_function_start): Set DECL_REGISTER on
+       a pseudo used for DECL_RESULT.
+
 2001-03-27  Stan Shebs  <shebs@apple.com>
 
        * objc/objc-act.c (objc_init): Use dump_base_name.
index e8e35aee5a552f428dc52c7be47619e61ba5f2cd..71bdf9d6766607b89e13b9766d9a49787a1ba5e4 100644 (file)
@@ -6387,10 +6387,13 @@ expand_function_start (subr, parms_have_cleanups)
 #endif
 
       SET_DECL_RTL (DECL_RESULT (subr), gen_reg_rtx (mode));
+      /* Needed because we may need to move this to memory
+        in case it's a named return value whose address is taken.  */
+      DECL_REGISTER (DECL_RESULT (subr)) = 1;
     }
   else
-    /* Scalar, returned in a register.  */
     {
+      /* Scalar, returned in a register.  */
       SET_DECL_RTL (DECL_RESULT (subr),
                    hard_function_value (TREE_TYPE (DECL_RESULT (subr)), 
                                         subr, 1));