integrate.c (copy_rtx_and_substitute): Squash MEM_EXPR when it refers to a subroutine...
authorRichard Henderson <rth@redhat.com>
Thu, 1 Aug 2002 23:07:33 +0000 (16:07 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 1 Aug 2002 23:07:33 +0000 (16:07 -0700)
        * integrate.c (copy_rtx_and_substitute): Squash MEM_EXPR when it
        refers to a subroutine parameter.

From-SVN: r55956

gcc/ChangeLog
gcc/integrate.c

index 5993d719694d5b1008b27759912b68266e4de504..c65c89e570347b9674b2bd7ceda4f3c458e1754c 100644 (file)
@@ -1,3 +1,8 @@
+2002-08-01  Richard Henderson  <rth@redhat.com>
+
+       * integrate.c (copy_rtx_and_substitute): Squash MEM_EXPR when it
+       refers to a subroutine parameter.
+
 2002-08-01  Jakub Jelinek  <jakub@redhat.com>
 
        * varasm.c (assemble_visibility): Strip name encoding.
index c7eb5069b1c1dce07fc428a622bcffedf8fce71c..253d25414eb01fb585e5b698ae7ac7597a818449 100644 (file)
@@ -2321,6 +2321,13 @@ copy_rtx_and_substitute (orig, map, for_lhs)
       if (inlining && !for_lhs)
        RTX_UNCHANGING_P (copy) = 0;
 
+      /* If inlining, squish aliasing data that references the subroutine's
+        parameter list, since that's no longer applicable.  */
+      if (inlining && MEM_EXPR (copy)
+         && TREE_CODE (MEM_EXPR (copy)) == INDIRECT_REF
+         && TREE_CODE (TREE_OPERAND (MEM_EXPR (copy), 0)) == PARM_DECL)
+       set_mem_expr (copy, NULL_TREE);
+
       return copy;
 
     default: