diff options
author | Mike Stump <mikestump@comcast.net> | 2010-02-20 17:28:14 +0000 |
---|---|---|
committer | Mike Stump <mrs@gcc.gnu.org> | 2010-02-20 17:28:14 +0000 |
commit | c387e0676eb6949dfc49681d6ac1b09c3e11d2ca (patch) | |
tree | 726f3c2083b55909bc072fa4afaf459f0c016422 /gcc/c-decl.c | |
parent | f7172b55bb859fd27939374247df4cb0a24f03c0 (diff) | |
download | gcc-c387e0676eb6949dfc49681d6ac1b09c3e11d2ca.zip gcc-c387e0676eb6949dfc49681d6ac1b09c3e11d2ca.tar.gz gcc-c387e0676eb6949dfc49681d6ac1b09c3e11d2ca.tar.bz2 |
re PR c/43125 (Revision 156907 failed gcc.dg/attr-used.c)
PR middle-end/43125
* c-decl.c (merge_decls): Merge DECL_PRESERVE_P.
From-SVN: r156927
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index e48cdc8..e8e7a45 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 |