From b42186f16474032ac2fa82027d3b7bf31e94daef Mon Sep 17 00:00:00 2001 From: Mike Stump Date: Fri, 19 Feb 2010 19:06:38 +0000 Subject: 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 --- gcc/ipa-pure-const.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/ipa-pure-const.c') diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c index 31883a2..806faf6 100644 --- a/gcc/ipa-pure-const.c +++ b/gcc/ipa-pure-const.c @@ -159,7 +159,7 @@ check_decl (funct_state local, /* If the variable has the "used" attribute, treat it as if it had a been touched by the devil. */ - if (lookup_attribute ("used", DECL_ATTRIBUTES (t))) + if (DECL_PRESERVE_P (t)) { local->pure_const_state = IPA_NEITHER; if (dump_file) -- cgit v1.1