diff options
author | Jan Hubicka <jh@suse.cz> | 2009-10-07 18:36:43 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2009-10-07 16:36:43 +0000 |
commit | 3621d5ec1db7d5088320465877cb97082141f8e5 (patch) | |
tree | 8d44193126b0e58b978c363ad1b4310858955c38 /gcc | |
parent | f8921d7ddfff1ccf3718d7fb82821ff0dff98708 (diff) | |
download | gcc-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')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cgraph.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2893556..213f4b6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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, 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. */ |