ipa.c (function_and_variable_visibility): Also bring local all aliases.
authorJan Hubicka <jh@suse.cz>
Sun, 16 May 2010 17:26:55 +0000 (19:26 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sun, 16 May 2010 17:26:55 +0000 (17:26 +0000)
* ipa.c (function_and_variable_visibility): Also bring local all
aliases.

From-SVN: r159461

gcc/ChangeLog
gcc/ipa.c

index 71cf0d3c0d2b3c75a5b9b6207dd21b7e8977fcb2..94f6358719f352248baccdfa396122851e559a49 100644 (file)
@@ -1,3 +1,8 @@
+2010-05-16  Jan Hubicka  <jh@suse.cz>
+
+       * ipa.c (function_and_variable_visibility): Also bring local all
+       aliases.
+
 2010-05-16  Richard Guenther  <rguenther@suse.de>
 
        * alias.c (nonoverlapping_memrefs_p): Remove use of
index 9d2b023a5b0a666244add1c4e644dda612d066df..c8b0d7b385d798b87e0ce4bf404a60ef8c241eb9 100644 (file)
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -655,8 +655,11 @@ function_and_variable_visibility (bool whole_program)
       if (!node->local.externally_visible && node->analyzed
          && !DECL_EXTERNAL (node->decl))
        {
+          struct cgraph_node *alias;
          gcc_assert (whole_program || !TREE_PUBLIC (node->decl));
          cgraph_make_decl_local (node->decl);
+         for (alias = node->same_body; alias; alias = alias->next)
+           cgraph_make_decl_local (alias->decl);
          if (node->same_comdat_group)
            /* cgraph_externally_visible_p has already checked all other nodes
               in the group and they will all be made local.  We need to