* integrate.c (copy_decl_for_inlining): Preserve TREE_ADDRESSABLE
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 27 Feb 2000 02:43:43 +0000 (02:43 +0000)
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 27 Feb 2000 02:43:43 +0000 (02:43 +0000)
when copying a PARM_DECL or RESULT_DECL.

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

gcc/ChangeLog
gcc/integrate.c

index e1e14c3..35af536 100644 (file)
@@ -1,3 +1,8 @@
+2000-02-26  Mark Mitchell  <mark@codesourcery.com>
+
+       * integrate.c (copy_decl_for_inlining): Preserve TREE_ADDRESSABLE
+       when copying a PARM_DECL or RESULT_DECL.
+
 2000-02-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * fix-header.c (recognized_function): Also fix prototypes for
index d38af99..cf2200e 100644 (file)
@@ -312,9 +312,12 @@ copy_decl_for_inlining (decl, from_fn, to_fn)
 
   /* Copy the declaration.  */
   if (TREE_CODE (decl) == PARM_DECL || TREE_CODE (decl) == RESULT_DECL)
-    /* For a parameter, we must make an equivalent VAR_DECL, not a
-       new PARM_DECL.  */
-    copy = build_decl (VAR_DECL, DECL_NAME (decl), TREE_TYPE (decl));
+    {
+      /* For a parameter, we must make an equivalent VAR_DECL, not a
+        new PARM_DECL.  */
+      copy = build_decl (VAR_DECL, DECL_NAME (decl), TREE_TYPE (decl));
+      TREE_ADDRESSABLE (copy) = TREE_ADDRESSABLE (decl);
+    }
   else
     {
       copy = copy_node (decl);