OSDN Git Service

* function.c (expand_function_start): Set DECL_REGISTER on
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 28 Mar 2001 03:28:28 +0000 (03:28 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 28 Mar 2001 03:28:28 +0000 (03:28 +0000)
        a pseudo used for DECL_RESULT.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40896 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/function.c

index 6d8d115..0f24eae 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 e8e35ae..71bdf9d 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));