aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2009-10-07 18:36:43 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2009-10-07 16:36:43 +0000
commit3621d5ec1db7d5088320465877cb97082141f8e5 (patch)
tree8d44193126b0e58b978c363ad1b4310858955c38 /gcc/cgraph.c
parentf8921d7ddfff1ccf3718d7fb82821ff0dff98708 (diff)
downloadgcc-3621d5ec1db7d5088320465877cb97082141f8e5.zip
gcc-3621d5ec1db7d5088320465877cb97082141f8e5.tar.gz
gcc-3621d5ec1db7d5088320465877cb97082141f8e5.tar.bz2
cgraph.c (cgraph_node_can_be_local): Handle externally visible nodes correctly.
* cgraph.c (cgraph_node_can_be_local): Handle externally visible nodes correctly. From-SVN: r152532
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index bc8f101..01fbb9a 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -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. */