Merge DECL_PRESERVE_P for C++.

2010-02-22  Mike Stump  <mikestump@comcast.net>

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

From-SVN: r156977
This commit is contained in:
Mike Stump 2010-02-22 21:57:22 +00:00 committed by H.J. Lu
parent 38bddaf26d
commit 3a7ba0405d
2 changed files with 9 additions and 0 deletions

View 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> 2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/23510 PR c++/23510

View File

@ -2093,6 +2093,10 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
TREE_USED (newdecl) = 1; TREE_USED (newdecl) = 1;
else if (TREE_USED (newdecl)) else if (TREE_USED (newdecl))
TREE_USED (olddecl) = 1; 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) if (TREE_CODE (newdecl) == FUNCTION_DECL)
{ {