aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-streamer-in.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2009-10-14 14:14:44 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2009-10-14 14:14:44 +0000
commit200c8750d65ebebc8a0d6f6f77a7f02b5a4a8ef3 (patch)
tree3d83178500a3538048d92b6df95e7c2182d671f7 /gcc/lto-streamer-in.c
parent77ce724c6b608989a50dd9ae86264ee0eec1b46a (diff)
downloadgcc-200c8750d65ebebc8a0d6f6f77a7f02b5a4a8ef3.zip
gcc-200c8750d65ebebc8a0d6f6f77a7f02b5a4a8ef3.tar.gz
gcc-200c8750d65ebebc8a0d6f6f77a7f02b5a4a8ef3.tar.bz2
lto-symtab.c (lto_symtab_compatible): Fold in ...
2009-10-14 Richard Guenther <rguenther@suse.de> * lto-symtab.c (lto_symtab_compatible): Fold in ... (lto_symtab_merge): ... here. Rewrite both to take the prevailing and a to-be-merged entry and to queue diagnostics properly. (lto_symtab_resolve_replaceable_p): New predicate for symbol resolution. (lto_symtab_resolve_can_prevail_p): Likewise. (lto_symtab_resolve_symbols): Rewrite. Fold in code that handles merging commons by choosing the largest decl. Fold in code that gives ODR errors. (lto_symtab_merge_decls_2): Simplify a lot. Emit queued diagnostics here. (lto_symtab_merge_decls_1): Re-structure. Deal with the case of no prevailing decl here. Diagnose mismatches in object types here. Drop all but the prevailing decls. (lto_symtab_prevailing_decl): Return the single prevailing decl. * lto-streamer-in.c (lto_input_tree_ref): Deal with VIEW_CONVERT_EXPRs in decl slots. Unshare the tree in this case. lto/ * lto.c (lto_fixup_tree): In case the prevailing decl is not compatible with the one we replace wrap it around a VIEW_CONVERT_EXPR. From-SVN: r152768
Diffstat (limited to 'gcc/lto-streamer-in.c')
-rw-r--r--gcc/lto-streamer-in.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c
index a899f9d..14b0c13 100644
--- a/gcc/lto-streamer-in.c
+++ b/gcc/lto-streamer-in.c
@@ -353,7 +353,16 @@ lto_input_tree_ref (struct lto_input_block *ib, struct data_in *data_in,
ix_u = lto_input_uleb128 (ib);
result = lto_file_decl_data_get_var_decl (data_in->file_data, ix_u);
if (tag == LTO_global_decl_ref)
- varpool_mark_needed_node (varpool_node (result));
+ {
+ if (TREE_CODE (result) == VIEW_CONVERT_EXPR)
+ {
+ tree decl = TREE_OPERAND (result, 0);
+ varpool_mark_needed_node (varpool_node (decl));
+ result = build1 (VIEW_CONVERT_EXPR, TREE_TYPE (result), decl);
+ }
+ else
+ varpool_mark_needed_node (varpool_node (result));
+ }
break;
default: