re PR lto/61886 (LTO breaks fread with _FORTIFY_SOURCE=2)
authorJan Hubicka <hubicka@ucw.cz>
Wed, 9 Dec 2015 02:15:05 +0000 (03:15 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Wed, 9 Dec 2015 02:15:05 +0000 (02:15 +0000)
commit6b9ac1796ec8eed79e8d5e4ef03a347a6c86a25c
tree77618157acd1764e5dd8967035809f5e54b46242
parent1a161cd7a7545318c1ee29dfd2eb76ee6ee9f43e
re PR lto/61886 (LTO breaks fread with _FORTIFY_SOURCE=2)

PR ipa/61886
* lto-streamer.h (lto_symtab_merge_decls, lto_symtab_merge_symbols,
lto_symtab_prevailing_decl): MOve to lto-symtab.h.
* lto-streamer-out.c (DFS::DFS_write_tree_body): Check that
DECL_ABSTRACT_ORIGIN is not error_mark_node.

* lto-symtab.c: Include lto-symtab.h.
(lto_cgraph_replace_node): Do not merge profiles here.
(lto_symtab_merge_p): New function.
(lto_symtab_merge_decls_2): Honor lto_symtab_merge_p.
(lto_symtab_merge_symbols_1): Turn unmerged decls into transparent
aliases.
(lto_symtab_merge_symbols): Do not clear node->aux; we no longer use it.
(lto_symtab_prevailing_decl): Move to lto-symtab.h; rewrite.
* lto.c: Include lto-symtab.h
* lto-symtab.h: New.

From-SVN: r231438
gcc/ChangeLog
gcc/lto-streamer-out.c
gcc/lto-streamer.h
gcc/lto/ChangeLog
gcc/lto/lto-symtab.c
gcc/lto/lto-symtab.h [new file with mode: 0644]
gcc/lto/lto.c