integrate.c (initialize_for_inline): In DECL_RTL of a PARM_DECL, look inside a (mem...
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>
Fri, 12 Dec 1997 16:06:57 +0000 (16:06 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 12 Dec 1997 16:06:57 +0000 (09:06 -0700)
* integrate.c (initialize_for_inline): In DECL_RTL of a PARM_DECL,
look inside a (mem (addressof (mem ...))).

From-SVN: r17075

gcc/ChangeLog.11
gcc/integrate.c

index 7ea0d5e7e8d41a7b3a06551fe8a1b36b7c6477dc..8620152be4d3264b054e930606373c18d5d9ff3e 100644 (file)
@@ -1,6 +1,7 @@
-Wed Dec 10 18:38:56 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
+Fri Dec 12 08:01:44 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
 
-       * Version 2.8.0 released.
+       * integrate.c (initialize_for_inline): In DECL_RTL of a PARM_DECL,
+       look inside a (mem (addressof (mem ...))).
 
 Wed Dec 10 18:38:28 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
  
index 6d27e4957653731770ed6c2ec4a901ea6d14a89b..70aaf16f2e63ebe42c23209a1e4016ab232bf6a0 100644 (file)
@@ -276,6 +276,13 @@ initialize_for_inline (fndecl, min_labelno, max_labelno, max_reg, copy)
     {
       rtx p = DECL_RTL (parms);
 
+      /* If we have (mem (addressof (mem ...))), use the inner MEM since
+        otherwise the copy_rtx call below will not unshare the MEM since
+        it shares ADDRESSOF.  */
+      if (GET_CODE (p) == MEM && GET_CODE (XEXP (p, 0)) == ADDRESSOF
+         && GET_CODE (XEXP (XEXP (p, 0), 0)) == MEM)
+       p = XEXP (XEXP (p, 0), 0);
+
       if (GET_CODE (p) == MEM && copy)
        {
          /* Copy the rtl so that modifications of the addresses