OSDN Git Service

2010-04-15 Thomas Schwinge <tschwinge@gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / ipa.c
index 9d2b023..01beca7 100644 (file)
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -388,10 +388,7 @@ cgraph_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
                      node->analyzed = false;
                      node->local.inlinable = false;
                    }
-                 else
-                   gcc_assert (!clone->in_other_partition);
                  cgraph_node_remove_callees (node);
-                 ipa_remove_all_references (&node->ref_list);
                  if (node->prev_sibling_clone)
                    node->prev_sibling_clone->next_sibling_clone = node->next_sibling_clone;
                  else if (node->clone_of)
@@ -655,8 +652,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