OSDN Git Service

* function.c (clobber_return_register): Clobber the pseudo return
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 8 Jun 2001 12:26:51 +0000 (12:26 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 8 Jun 2001 12:26:51 +0000 (12:26 +0000)
register too.

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

gcc/ChangeLog
gcc/function.c

index 05be51c..016586b 100644 (file)
@@ -1,5 +1,8 @@
 Fri Jun  8 14:16:33 CEST 2001  Jan Hubicka  <jh@suse.cz>
 
+       * function.c (clobber_return_register): Clobber the pseudo return
+       register too.
+
        * sibcall.c (skip_unreturned_value): New function.
        (call_ends_block_p): Use it.
 
index 64df1bd..cef6697 100644 (file)
@@ -6601,6 +6601,17 @@ void
 clobber_return_register ()
 {
   diddle_return_value (do_clobber_return_reg, NULL);
+
+  /* In case we do use pseudo to return value, clobber it too.  */
+  if (DECL_RTL_SET_P (DECL_RESULT (current_function_decl)))
+    {
+      tree decl_result = DECL_RESULT (current_function_decl);
+      rtx decl_rtl = DECL_RTL (decl_result);
+      if (REG_P (decl_rtl) && REGNO (decl_rtl) >= FIRST_PSEUDO_REGISTER)
+       {
+         do_clobber_return_reg (decl_rtl, NULL);
+       }
+    }
 }
 
 static void