]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Merge DECL_PRESERVE_P for C++.
authorMike Stump <mikestump@comcast.net>
Mon, 22 Feb 2010 21:57:22 +0000 (21:57 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Mon, 22 Feb 2010 21:57:22 +0000 (13:57 -0800)
2010-02-22  Mike Stump  <mikestump@comcast.net>

PR c++/43125
* decl.c (duplicate_decls): Merge DECL_PRESERVE_P.

From-SVN: r156977

gcc/cp/ChangeLog
gcc/cp/decl.c

index e933965fec4b2f8cb24862c865172b2f4c1836e1..3c967b3622ecbb373199b9432a97aa9e2f9fd59e 100644 (file)
@@ -1,3 +1,8 @@
+2010-02-22  Mike Stump  <mikestump@comcast.net>
+
+       PR c++/43125
+       * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
+
 2010-02-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
 
        PR c++/23510
index a22cf0114fac6ef3cfd75d1e346289346ffb0800..3eec0c7b48c7c4d276f797e6369964b70b335bdb 100644 (file)
@@ -2093,6 +2093,10 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
     TREE_USED (newdecl) = 1;
   else if (TREE_USED (newdecl))
     TREE_USED (olddecl) = 1;
+  if (DECL_PRESERVE_P (olddecl))
+    DECL_PRESERVE_P (newdecl) = 1;
+  else if (DECL_PRESERVE_P (newdecl))
+    DECL_PRESERVE_P (olddecl) = 1;
 
   if (TREE_CODE (newdecl) == FUNCTION_DECL)
     {