]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
cgraph.c (cgraph_node_can_be_local): Handle externally visible nodes correctly.
authorJan Hubicka <jh@suse.cz>
Wed, 7 Oct 2009 16:36:43 +0000 (18:36 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Wed, 7 Oct 2009 16:36:43 +0000 (16:36 +0000)
* cgraph.c (cgraph_node_can_be_local): Handle externally visible nodes
correctly.

From-SVN: r152532

gcc/ChangeLog
gcc/cgraph.c

index 2893556ea8b658e6cbab1e8138efb784857605d6..213f4b61368014b2e45fffd10294748ec9e7b191 100644 (file)
@@ -1,3 +1,8 @@
+2009-10-06  Jan Hubicka  <jh@suse.cz>
+
+       * cgraph.c (cgraph_node_can_be_local): Handle externally visible nodes
+       correctly.
+
 2009-10-06  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/i386.md (*lea_1_rex64, *lea_1, *lea_1_zext,
index bc8f1015e62f954c0bb3dc1c0f48336856d55e12..01fbb9a85d79610e7761127cdcb80f7c332238f3 100644 (file)
@@ -1983,7 +1983,8 @@ cgraph_add_new_function (tree fndecl, bool lowered)
 bool
 cgraph_node_can_be_local_p (struct cgraph_node *node)
 {
-  return !node->needed;
+  return (!node->needed
+         && (DECL_COMDAT (node->decl) || !node->local.externally_visible));
 }
 
 /* Bring NODE local.  */