summaryrefslogtreecommitdiff
path: root/gcc/symtab.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2015-02-11 20:11:47 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2015-02-11 19:11:47 +0000
commitd3f2e41eae66b3699aaa6e2bfc4ce5b86cedd37e (patch)
tree8ab6d8436aa96eaf64d3698bb24df0eaba1b0f19 /gcc/symtab.c
parent0a7d7e09c8e8aa2c79479e48bd4fee31dd0fe532 (diff)
ipa.c (symbol_table::remove_unreachable_nodes): Avoid releasing bodies of thunks; comment on why.
* ipa.c (symbol_table::remove_unreachable_nodes): Avoid releasing bodies of thunks; comment on why. * symtab.c (symtab_node::get_partitioning_class): Aliases of extern symbols are extern. From-SVN: r220630
Diffstat (limited to 'gcc/symtab.c')
-rw-r--r--gcc/symtab.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/symtab.c b/gcc/symtab.c
index 3bfb04a25c1..3cdf62aeede 100644
--- a/gcc/symtab.c
+++ b/gcc/symtab.c
@@ -1779,6 +1779,8 @@ symtab_node::get_partitioning_class (void)
if (varpool_node *vnode = dyn_cast <varpool_node *> (this))
{
+ if (alias && definition && !ultimate_alias_target ()->definition)
+ return SYMBOL_EXTERNAL;
/* Constant pool references use local symbol names that can not
be promoted global. We should never put into a constant pool
objects that can not be duplicated across partitions. */
@@ -1790,7 +1792,7 @@ symtab_node::get_partitioning_class (void)
Handle them as external; compute_ltrans_boundary take care to make
proper things to happen (i.e. to make them appear in the boundary but
with body streamed, so clone can me materialized). */
- else if (!dyn_cast <cgraph_node *> (this)->definition)
+ else if (!dyn_cast <cgraph_node *> (this)->function_symbol ()->definition)
return SYMBOL_EXTERNAL;
/* Linker discardable symbols are duplicated to every use unless they are