aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorMike Stump <mikestump@comcast.net>2010-02-19 19:06:38 +0000
committerMike Stump <mrs@gcc.gnu.org>2010-02-19 19:06:38 +0000
commitb42186f16474032ac2fa82027d3b7bf31e94daef (patch)
tree7833337ec015312bc0a4f42179ae921a7ef30c24 /gcc/config
parentcf9280bf7e26b68be590b813d46aea29db5061de (diff)
downloadgcc-b42186f16474032ac2fa82027d3b7bf31e94daef.zip
gcc-b42186f16474032ac2fa82027d3b7bf31e94daef.tar.gz
gcc-b42186f16474032ac2fa82027d3b7bf31e94daef.tar.bz2
re PR objc/43061 (47 new GCC HEAD@156527 regressions)
PR objc/43061 * cgraphunit.c (process_function_and_variable_attributes): Check DECL_PRESERVE_P instead of looking up attribute "used". * ipa-pure-const.c (check_decl): Likewise. * ipa-reference.c (has_proper_scope_for_analysis): Likewise. * ipa-type-escape.c (has_proper_scope_for_analysis): Likewise. * config/sol2.c (solaris_insert_attributes): Set DECL_PRESERVE_P instead of attribute "used". * config/sol2-c.c (solaris_pragma_init): Likewise. (solaris_pragma_fini): Likewise. From-SVN: r156907
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/sol2-c.c14
-rw-r--r--gcc/config/sol2.c8
2 files changed, 12 insertions, 10 deletions
diff --git a/gcc/config/sol2-c.c b/gcc/config/sol2-c.c
index da00377..601db97 100644
--- a/gcc/config/sol2-c.c
+++ b/gcc/config/sol2-c.c
@@ -170,9 +170,10 @@ solaris_pragma_init (cpp_reader *pfile ATTRIBUTE_UNUSED)
tree decl = identifier_global_value (t);
if (decl && DECL_P (decl))
{
- tree init_list = build_tree_list (get_identifier ("init"),
- NULL);
- tree attrs = tree_cons (get_identifier ("used"), NULL, init_list);
+ tree attrs = build_tree_list (get_identifier ("init"),
+ NULL);
+ TREE_USED (decl) = 1;
+ DECL_PRESERVE_P (decl) = 1;
decl_attributes (&decl, attrs, 0);
}
else
@@ -228,9 +229,10 @@ solaris_pragma_fini (cpp_reader *pfile ATTRIBUTE_UNUSED)
tree decl = identifier_global_value (t);
if (decl && DECL_P (decl))
{
- tree fini_list = build_tree_list (get_identifier ("fini"),
- NULL);
- tree attrs = tree_cons (get_identifier ("used"), NULL, fini_list);
+ tree attrs = build_tree_list (get_identifier ("fini"),
+ NULL);
+ TREE_USED (decl) = 1;
+ DECL_PRESERVE_P (decl) = 1;
decl_attributes (&decl, attrs, 0);
}
else
diff --git a/gcc/config/sol2.c b/gcc/config/sol2.c
index bf7da83..493816c1 100644
--- a/gcc/config/sol2.c
+++ b/gcc/config/sol2.c
@@ -70,8 +70,8 @@ solaris_insert_attributes (tree decl, tree *attributes)
{
*attributes = tree_cons (get_identifier ("init"), NULL,
*attributes);
- *attributes = tree_cons (get_identifier ("used"), NULL,
- *attributes);
+ TREE_USED (decl) = 1;
+ DECL_PRESERVE_P (decl) = 1;
next = TREE_CHAIN (*x);
ggc_free (*x);
*x = next;
@@ -87,8 +87,8 @@ solaris_insert_attributes (tree decl, tree *attributes)
{
*attributes = tree_cons (get_identifier ("fini"), NULL,
*attributes);
- *attributes = tree_cons (get_identifier ("used"), NULL,
- *attributes);
+ TREE_USED (decl) = 1;
+ DECL_PRESERVE_P (decl) = 1;
next = TREE_CHAIN (*x);
ggc_free (*x);
*x = next;