OSDN Git Service

* cgraph.c (cgraph_node_can_be_local): Handle externally visible nodes
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Oct 2009 16:36:43 +0000 (16:36 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Oct 2009 16:36:43 +0000 (16:36 +0000)
correctly.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152532 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/cgraph.c

index 2893556..213f4b6 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 bc8f101..01fbb9a 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.  */