2009-10-14 Richard Guenther <rguenther@suse.de>
commitbc0ed27cfa8d09e9ea1060918377d3d2b205478e
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Oct 2009 14:14:44 +0000 (14 14:14 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Oct 2009 14:14:44 +0000 (14 14:14 +0000)
tree3d83178500a3538048d92b6df95e7c2182d671f7
parent9c03157769e0ce3c58c191dd898eb6e9726912a3
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152768 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/lto-streamer-in.c
gcc/lto-symtab.c
gcc/lto/ChangeLog
gcc/lto/lto.c