diff options
author | Jan Hubicka <jh@suse.cz> | 2011-01-11 18:29:52 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2011-01-11 17:29:52 +0000 |
commit | 6e701822708dbcd9ec935a536830a522d24f8151 (patch) | |
tree | 8a0441a53aaf0333716ca7449a404e95b3435f3e /gcc/lto | |
parent | 1b248907583f1cf4e02ce4168ad35cf3fe7637ba (diff) | |
download | gcc-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/lto')
-rw-r--r-- | gcc/lto/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/lto/lto.c | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 319a47a..4cb66fe 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,10 @@ +2011-01-11 Jan Hubicka <jh@suse.cz> + + PR lto/45721 + PR lto/45375 + * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs are + not partitioned. + 2010-12-22 Nathan Froyd <froydnj@codesourcery.com> * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute): diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index 9cfb5e2..cbc192a 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -837,6 +837,8 @@ partition_cgraph_node_p (struct cgraph_node *node) || (DECL_COMDAT (node->decl) && !cgraph_used_from_object_file_p (node))) return false; + if (lookup_attribute ("weakref", DECL_ATTRIBUTES (node->decl))) + return false; return true; } @@ -854,6 +856,8 @@ partition_varpool_node_p (struct varpool_node *vnode) && !vnode->force_output && !varpool_used_from_object_file_p (vnode))) return false; + if (lookup_attribute ("weakref", DECL_ATTRIBUTES (vnode->decl))) + return false; return true; } |