diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-05-17 16:37:33 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-05-17 16:37:33 +0000 |
commit | aa419a527f91567691f226133efb0469b59359ac (patch) | |
tree | c091b61bf18ed877244605adef29bd8f35c140b1 /gcc/lto-streamer-out.c | |
parent | 2572143c16564137a3042a04b9eca06ef5919600 (diff) | |
download | gcc-aa419a527f91567691f226133efb0469b59359ac.tar.gz |
* lto-symtab.c (lto_symtab_resolve_symbols): Preffer decl with constructor
over decl without.
* cgraph.c (cgraph_remove_node): Clear also body of unanalyzed nodes.
* cgraph.h (varpool_can_remove_if_no_refs): Handle external correctly.
* cgraphunit.c (process_function_and_variable_attributes): Finalize
extrnal decls.
(mark_functions_to_output): Also accept bodies for functions with clones.
(output_in_order): Skip external vars.
* lto-cgraph.c (lto_output_node): External functions are never in other
partition.
(lto_output_varpool_node): Likewise.
* lto-streamer-out.c (lto_write_tree): Always use error_mark_nodes for
forgotten initializers.
* ipa.c (process_references): Handle external vars.
(symtab_remove_unreachable_nodes): Update to handle external vars.
(varpool_externally_visible_p): External vars are externally visible.
* gimple-fold.c (can_refer_decl_in_current_unit_p): Update.
* varpool.c (varpool_remove_node): Remove constructor.
(decide_is_variable_needed): Handle externals.
(varpool_remove_unreferenced_decls): Likewise.
* lto-partition.c (add_references_to_partition): Handle external vars.
(partition_varpool_node_p): Likewise.
(lto_promote_cross_file_statics): Do not promote externals.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187631 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-streamer-out.c')
-rw-r--r-- | gcc/lto-streamer-out.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index 9a54f1900ff..a4b28422664 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -353,11 +353,10 @@ lto_write_tree (struct output_block *ob, tree expr, bool ref_p) varpool_encoder = ob->decl_state->varpool_node_encoder; vnode = varpool_get_node (expr); - if (!vnode) + if (!vnode + || !lto_varpool_encoder_encode_initializer_p (varpool_encoder, + vnode)) initial = error_mark_node; - else if (!lto_varpool_encoder_encode_initializer_p (varpool_encoder, - vnode)) - initial = NULL; } stream_write_tree (ob, initial, ref_p); |