http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54534
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-09-11 09:49:27 UTC --- I am testing Index: gcc/cgraph.h =================================================================== --- gcc/cgraph.h (revision 191174) +++ gcc/cgraph.h (working copy) @@ -951,7 +951,7 @@ varpool_can_remove_if_no_refs (struct va return (!node->force_output && !node->used_from_other_partition && ((DECL_COMDAT (node->decl) && !varpool_used_from_object_file_p (node)) - || !node->externally_visible + || (flag_toplevel_reorder && !node->externally_visible) || DECL_HAS_VALUE_EXPR_P (node->decl))); } which restores previous behavior.