aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-streamer-out.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-10-04 11:23:18 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-10-04 11:23:18 +0000
commit5c1eb617e427a417dd7e1f79eee15b38362dbf53 (patch)
tree8bbabc4c74321f88facd411646c5cf2e47605c23 /gcc/tree-streamer-out.c
parent9cb62ce3c795fe9991d20a294a53c1bbeadf2751 (diff)
downloadgcc-5c1eb617e427a417dd7e1f79eee15b38362dbf53.zip
gcc-5c1eb617e427a417dd7e1f79eee15b38362dbf53.tar.gz
gcc-5c1eb617e427a417dd7e1f79eee15b38362dbf53.tar.bz2
re PR lto/47788 (New LTO failures)
2012-10-04 Richard Guenther <rguenther@suse.de> PR lto/47788 * tree-streamer-out.c (write_ts_block_tree_pointers): For inlined functions outer scopes write the ultimate origin as BLOCK_ABSTRACT_ORIGIN and BLOCK_SOURCE_LOCATION. Do not stream the fragment chains. * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Likewise. * dwarf2out.c (gen_subprogram_die): Handle NULL DECL_INITIAL. (dwarf2out_decl): Always output DECL_ABSTRACT function decls. From-SVN: r192075
Diffstat (limited to 'gcc/tree-streamer-out.c')
-rw-r--r--gcc/tree-streamer-out.c31
1 files changed, 21 insertions, 10 deletions
diff --git a/gcc/tree-streamer-out.c b/gcc/tree-streamer-out.c
index 63f7a02..4fccd77 100644
--- a/gcc/tree-streamer-out.c
+++ b/gcc/tree-streamer-out.c
@@ -685,21 +685,32 @@ write_ts_exp_tree_pointers (struct output_block *ob, tree expr, bool ref_p)
static void
write_ts_block_tree_pointers (struct output_block *ob, tree expr, bool ref_p)
{
- /* Do not stream BLOCK_SOURCE_LOCATION. We cannot handle debug information
- for early inlining so drop it on the floor instead of ICEing in
- dwarf2out.c. */
streamer_write_chain (ob, BLOCK_VARS (expr), ref_p);
+ stream_write_tree (ob, BLOCK_SUPERCONTEXT (expr), ref_p);
+
+ /* Stream BLOCK_ABSTRACT_ORIGIN and BLOCK_SOURCE_LOCATION for
+ the limited cases we can handle - those that represent inlined
+ function scopes. For the rest them on the floor instead of ICEing in
+ dwarf2out.c. */
+ if (inlined_function_outer_scope_p (expr))
+ {
+ tree ultimate_origin = block_ultimate_origin (expr);
+ stream_write_tree (ob, ultimate_origin, ref_p);
+ lto_output_location (ob, BLOCK_SOURCE_LOCATION (expr));
+ }
+ else
+ {
+ stream_write_tree (ob, NULL_TREE, ref_p);
+ lto_output_location (ob, UNKNOWN_LOCATION);
+ }
/* Do not stream BLOCK_NONLOCALIZED_VARS. We cannot handle debug information
- for early inlining so drop it on the floor instead of ICEing in
+ for early inlined BLOCKs so drop it on the floor instead of ICEing in
dwarf2out.c. */
- stream_write_tree (ob, BLOCK_SUPERCONTEXT (expr), ref_p);
- /* Do not stream BLOCK_ABSTRACT_ORIGIN. We cannot handle debug information
- for early inlining so drop it on the floor instead of ICEing in
- dwarf2out.c. */
- stream_write_tree (ob, BLOCK_FRAGMENT_ORIGIN (expr), ref_p);
- stream_write_tree (ob, BLOCK_FRAGMENT_CHAIN (expr), ref_p);
+ /* BLOCK_FRAGMENT_ORIGIN and BLOCK_FRAGMENT_CHAIN is not live at LTO
+ streaming time. */
+
/* Do not output BLOCK_SUBBLOCKS. Instead on streaming-in this
list is re-constructed from BLOCK_SUPERCONTEXT. */
}