Patch by rth to fix inline-of-an-inline return-value bug.
authorDonald Lindsay <dlindsay@cygnus.com>
Wed, 27 Sep 2000 21:08:33 +0000 (21:08 +0000)
committerDon Lindsay <dlindsay@gcc.gnu.org>
Wed, 27 Sep 2000 21:08:33 +0000 (21:08 +0000)
From-SVN: r36654

gcc/ChangeLog
gcc/integrate.c

index f2386a04478d208ad3b7f739247170d9f965e54e..67a022e3611ede220662ba6caeddd0426bc7ff88 100644 (file)
@@ -1,3 +1,8 @@
+Wed Sep 27 14:00:07 2000  Donald Lindsay  <dlindsay@cygnus.com>
+
+       * integrate.c (copy_insn_list): if an ignored return value
+       is being clobbered, skip cloning that into the inline copy.
+
 2000-09-27  Joseph S. Myers  <jsm28@cam.ac.uk>
 
        * extend.texi, invoke.texi, gcc.texi, install.texi: Consistently
index 79fbce6d422d030a42f200d076f6add6aa9fb1a8..cc3a5581985e4667b172bd4909e4dcff5402e6b8 100644 (file)
@@ -1294,6 +1294,13 @@ copy_insn_list (insns, map, static_chain_value)
                break;
            }
 
+         /* Similarly if an ignored return value is clobbered.  */
+         else if (map->inline_target == 0
+                  && GET_CODE (pattern) == CLOBBER
+                  && GET_CODE (XEXP (pattern, 0)) == REG
+                  && REG_FUNCTION_VALUE_P (XEXP (pattern, 0)))
+           break;
+
          /* If this is setting the static chain rtx, omit it.  */
          else if (static_chain_value != 0
                   && set != 0