diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5efdf1a24cd..d60824135c5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-07-15 Jan Hubicka + + * ipa.c (function_and_variable_visibility): Variables marked as used should + not be localized. + 2010-07-15 Jan Hubicka * cgraph.c: Include lto-streamer.h diff --git a/gcc/ipa.c b/gcc/ipa.c index 4be3fcfc959..bac3406be39 100644 --- 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",