aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa.c
diff options
context:
space:
mode:
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>2010-03-27 15:43:19 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2010-03-27 15:43:19 +0000
commitb932b8b1bb530cefca9dc7ff5ad2afbe5a881231 (patch)
tree3f19475141947ad20e92258cbb87e0916a1a6fbf /gcc/ipa.c
parentfb6807b860ac9bdb2cb345a43b9c3bf398aca013 (diff)
downloadgcc-b932b8b1bb530cefca9dc7ff5ad2afbe5a881231.zip
gcc-b932b8b1bb530cefca9dc7ff5ad2afbe5a881231.tar.gz
gcc-b932b8b1bb530cefca9dc7ff5ad2afbe5a881231.tar.bz2
re PR middle-end/41674 (/usr/ccs/bin/ld: Unsatisfied symbols: _GLOBAL__I_65535_0_main)
PR middle-end/41674 * cgraphunit.c (cgraph_build_static_cdtor): If target doesn't have cdtors, set DECL_PRESERVE_P. * ipa.c (cgraph_externally_visible_p): Return true if declaration should be preseved. From-SVN: r157779
Diffstat (limited to 'gcc/ipa.c')
-rw-r--r--gcc/ipa.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/ipa.c b/gcc/ipa.c
index c789a29..225f268 100644
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -317,6 +317,8 @@ cgraph_externally_visible_p (struct cgraph_node *node, bool whole_program)
return false;
if (!whole_program)
return true;
+ if (DECL_PRESERVE_P (node->decl))
+ return true;
/* COMDAT functions must be shared only if they have address taken,
otherwise we can produce our own private implementation with
-fwhole-program. */