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
This commit is contained in:
parent
fb6807b860
commit
b932b8b1bb
@ -1,3 +1,11 @@
|
||||
2010-03-27 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
|
||||
|
||||
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.
|
||||
|
||||
2010-03-27 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
PR tree-optimization/43528
|
||||
|
@ -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);
|
||||
|
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user