function.c (diddle_return_value): Use hard_function_value to get an rtx suitable...
authorJeffrey A Law <law@cygnus.com>
Fri, 12 Nov 1999 03:46:21 +0000 (03:46 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 12 Nov 1999 03:46:21 +0000 (20:46 -0700)
        * function.c (diddle_return_value): Use hard_function_value to
        get an rtx suitable for use in the USE/CLOBBER insn.

From-SVN: r30494

gcc/ChangeLog
gcc/function.c

index 7ac996639bcd1eb187902e227a3cc3b77c79f76e..68fbfbd27f6a15b7dac19d634109da7f4fb2ed86 100644 (file)
@@ -1,5 +1,8 @@
 Thu Nov 11 18:54:24 1999  Jeffrey A Law  (law@cygnus.com)
 
+       * function.c (diddle_return_value): Use hard_function_value to
+       get an rtx suitable for use in the USE/CLOBBER insn.
+
        * global.c (global_conflicts): Update comments.
        (record_conflicts): No need to record conflicts between pseudos here.
 
index edf979fa2adb57e78721ccd4435a978397310bc8..a8ed54c7af28efe9a97a8247eb6bed46e5b5f98f 100644 (file)
@@ -6200,10 +6200,16 @@ void
 diddle_return_value (code)
      enum rtx_code code;
 {
-  rtx return_reg = DECL_RTL (DECL_RESULT (current_function_decl));
+  rtx return_reg;
+  tree decl_result = DECL_RESULT (current_function_decl);
 
-  if (return_reg)
+  if (DECL_RTL (decl_result))
     {
+      /* Use hard_function_value to avoid creating a reference to a BLKmode 
+        register in the USE/CLOBBER insn.  */
+      return_reg = hard_function_value (TREE_TYPE (decl_result),
+                                       current_function_decl);
+
       if (GET_CODE (return_reg) == REG
          && REGNO (return_reg) < FIRST_PSEUDO_REGISTER)
        emit_insn (gen_rtx_fmt_e (code, VOIDmode, return_reg));