diff options
author | Richard Guenther <rguenther@suse.de> | 2011-12-19 15:57:02 +0000 |
---|---|---|
committer | Richard Guenther <rguenther@suse.de> | 2011-12-19 15:57:02 +0000 |
commit | bd88a53b179580b10810d93d11e494dd583aab4a (patch) | |
tree | 16b996c2025405cb5a936807037ff9de2de2ece6 /gcc/lto-streamer-out.c | |
parent | 458c9c9f53e441f7ce3bfa6e740e90094dc6dde2 (diff) |
2011-12-19 Richard Guenther <rguenther@suse.de>
PR lto/51573
* streamer-hooks.h (struct streamer_hooks): Add second
ref_p parameter to write_tree.
(stream_write_tree): Adjust.
(stream_write_tree_shallow_non_ref): New define.
* lto-streamer.h (lto_output_tree): Adjust.
* lto-streamer-out.c (lto_output_tree): Likewise.
* tree-streamer-out.c (streamer_write_chain): Only
force the immediate tree to be streamed as non-reference.
* gcc.dg/lto/20111207-2_0.c: Adjust.
* g++.dg/lto/pr51573-1_0.C: New testcase.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@182487 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-streamer-out.c')
-rw-r--r-- | gcc/lto-streamer-out.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index 6c1169a3ec6..4b3be3bb1ff 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -370,11 +370,12 @@ lto_write_tree (struct output_block *ob, tree expr, bool ref_p) /* Emit the physical representation of tree node EXPR to output block - OB. If REF_P is true, the leaves of EXPR are emitted as references - via lto_output_tree_ref. */ + OB. If THIS_REF_P is true, the leaves of EXPR are emitted as references + via lto_output_tree_ref. REF_P is used for streaming siblings of EXPR. */ void -lto_output_tree (struct output_block *ob, tree expr, bool ref_p) +lto_output_tree (struct output_block *ob, tree expr, + bool ref_p, bool this_ref_p) { unsigned ix; bool existed_p; @@ -385,7 +386,7 @@ lto_output_tree (struct output_block *ob, tree expr, bool ref_p) return; } - if (ref_p && tree_is_indexable (expr)) + if (this_ref_p && tree_is_indexable (expr)) { lto_output_tree_ref (ob, expr); return; |