diff options
author | John David Anglin <dave.anglin@nrc-cnrc.gc.ca> | 2010-03-27 15:43:19 +0000 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2010-03-27 15:43:19 +0000 |
commit | b932b8b1bb530cefca9dc7ff5ad2afbe5a881231 (patch) | |
tree | 3f19475141947ad20e92258cbb87e0916a1a6fbf /gcc/cgraphunit.c | |
parent | fb6807b860ac9bdb2cb345a43b9c3bf398aca013 (diff) | |
download | gcc-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/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index c41477b..185fc53 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -1946,7 +1946,11 @@ cgraph_build_static_cdtor (char which, tree body, int priority) DECL_ARTIFICIAL (decl) = 1; DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (decl) = 1; DECL_SAVED_TREE (decl) = body; - TREE_PUBLIC (decl) = ! targetm.have_ctors_dtors; + if (!targetm.have_ctors_dtors) + { + TREE_PUBLIC (decl) = 1; + DECL_PRESERVE_P (decl) = 1; + } DECL_UNINLINABLE (decl) = 1; DECL_INITIAL (decl) = make_node (BLOCK); |