From: Jan Hubicka Date: Wed, 7 Oct 2009 16:36:43 +0000 (+0200) Subject: cgraph.c (cgraph_node_can_be_local): Handle externally visible nodes correctly. X-Git-Tag: releases/gcc-4.5.0~3058 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3621d5ec1db7d5088320465877cb97082141f8e5;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2893556ea8b6..213f4b613680 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2009-10-06 Jan Hubicka + + * cgraph.c (cgraph_node_can_be_local): Handle externally visible nodes + correctly. + 2009-10-06 Uros Bizjak * config/i386/i386.md (*lea_1_rex64, *lea_1, *lea_1_zext, diff --git a/gcc/cgraph.c b/gcc/cgraph.c index bc8f1015e62f..01fbb9a85d79 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. */