ipa.c (function_and_variable_visibility): Variables marked as used should not be...
authorJan Hubicka <jh@suse.cz>
Thu, 15 Jul 2010 11:03:03 +0000 (13:03 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 15 Jul 2010 11:03:03 +0000 (11:03 +0000)
* ipa.c (function_and_variable_visibility): Variables marked as used should
not be localized.

From-SVN: r162215

gcc/ChangeLog
gcc/ipa.c

index 5efdf1a24cd59bc05e1c6bb3e992d1f75e6f200f..d60824135c54f23e558b2c8daee8b63568f2e421 100644 (file)
@@ -1,3 +1,8 @@
+2010-07-15  Jan Hubicka  <jh@suse.cz>
+
+       * ipa.c (function_and_variable_visibility): Variables marked as used should
+       not be localized.
+
 2010-07-15  Jan Hubicka  <jh@suse.cz>
 
        * cgraph.c: Include lto-streamer.h
index 4be3fcfc95919af836a3f9311038cc1bc70c421b..bac3406be396a8b573d5314475c73d277fb7e569 100644 (file)
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -786,6 +786,7 @@ function_and_variable_visibility (bool whole_program)
                   /* We can get prevailing decision in other object file.
                      In this case we do not sed used_from_object_file.  */
                   || !vnode->finalized))
+             || DECL_PRESERVE_P (vnode->decl)
               || vnode->used_from_object_file
              || pointer_set_contains (aliased_vnodes, vnode)
              || lookup_attribute ("externally_visible",