From: mrs Date: Sat, 20 Feb 2010 17:28:14 +0000 (+0000) Subject: PR middle-end/43125 X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=5b5632f73a3e4722ea361d9c11d9e53efd76606c PR middle-end/43125 * c-decl.c (merge_decls): Merge DECL_PRESERVE_P. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156927 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4ab4c0d6e87..aa2d0fa4dbe 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -37,6 +37,9 @@ 2010-02-19 Mike Stump + PR middle-end/43125 + * c-decl.c (merge_decls): Merge DECL_PRESERVE_P. + PR objc/43061 * cgraphunit.c (process_function_and_variable_attributes): Check DECL_PRESERVE_P instead of looking up attribute "used". diff --git a/gcc/c-decl.c b/gcc/c-decl.c index e48cdc88e4e..e8e7a45f94f 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -2387,6 +2387,10 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype) 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; /* Copy most of the decl-specific fields of NEWDECL into OLDDECL. But preserve OLDDECL's DECL_UID, DECL_CONTEXT and