aboutsummaryrefslogtreecommitdiff
path: root/gcc/passes.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2011-01-11 18:29:52 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2011-01-11 17:29:52 +0000
commit6e701822708dbcd9ec935a536830a522d24f8151 (patch)
tree8a0441a53aaf0333716ca7449a404e95b3435f3e /gcc/passes.c
parent1b248907583f1cf4e02ce4168ad35cf3fe7637ba (diff)
downloadgcc-6e701822708dbcd9ec935a536830a522d24f8151.zip
gcc-6e701822708dbcd9ec935a536830a522d24f8151.tar.gz
gcc-6e701822708dbcd9ec935a536830a522d24f8151.tar.bz2
re PR lto/45721 (ICE: in function_and_variable_visibility, at ipa.c:673 with -flto)
PR lto/45721 PR lto/45375 * tree.h (symbol_alias_set_t): Move typedef here from varasm.c (symbol_alias_set_destroy, symbol_alias_set_contains, propagate_aliases_backward): Declare. * lto-streamer-out.c (struct sets): New sturcture. (trivally_defined_alias): New function. (output_alias_pair_p): Rewrite. (output_unreferenced_globals): Fix output of alias pairs. (produce_symtab): Likewise. * ipa.c (function_and_variable_visibility): Set weak alias destination as needed in lto. * varasm.c (symbol_alias_set_t): Remove. (symbol_alias_set_destroy): Export. (propagate_aliases_forward, propagate_aliases_backward): New functions based on ... (compute_visible_aliases): ... this one; remove. (trivially_visible_alias): New (trivially_defined_alias): New. (remove_unreachable_alias_pairs): Rewrite. (finish_aliases_1): Reorganize code checking if alias is defined. * passes.c (rest_of_decl_compilation): Do not call assemble_alias when in LTO mode. * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs are not partitioned. * testsuite/gcc.dg/lto/pr45721_1.c: New file. * testsuite/gcc.dg/lto/pr45721_0.c: New file. From-SVN: r168666
Diffstat (limited to 'gcc/passes.c')
-rw-r--r--gcc/passes.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/passes.c b/gcc/passes.c
index 804ac9f..090110e 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -144,6 +144,7 @@ rest_of_decl_compilation (tree decl,
{
/* We deferred calling assemble_alias so that we could collect
other attributes such as visibility. Emit the alias now. */
+ if (!in_lto_p)
{
tree alias;
alias = lookup_attribute ("alias", DECL_ATTRIBUTES (decl));