+2014-08-19 Richard Biener <rguenther@suse.de>
+
+ * lto-streamer-out.c (DFS::DFS_write_tree_body): Stream
+ DECL_EXTERNALs in BLOCKs as non-references.
+ * tree-streamer-out.c (streamer_write_chain): Likewise.
+
2014-08-19 Alexander Ivchenko <alexander.ivchenko@intel.com>
Maxim Kuznetsov <maxim.kuznetsov@intel.com>
Anna Tikhonova <anna.tikhonova@intel.com>
if (CODE_CONTAINS_STRUCT (code, TS_BLOCK))
{
for (tree t = BLOCK_VARS (expr); t; t = TREE_CHAIN (t))
- /* ??? FIXME. See also streamer_write_chain. */
- if (!(VAR_OR_FUNCTION_DECL_P (t)
- && DECL_EXTERNAL (t)))
+ if (VAR_OR_FUNCTION_DECL_P (t)
+ && DECL_EXTERNAL (t))
+ /* We have to stream externals in the block chain as
+ non-references. See also
+ tree-streamer-out.c:streamer_write_chain. */
+ DFS_write_tree (ob, expr_state, t, ref_p, false, single_p);
+ else
DFS_follow_tree_edge (t);
DFS_follow_tree_edge (BLOCK_SUPERCONTEXT (expr));
/* We avoid outputting external vars or functions by reference
to the global decls section as we do not want to have them
enter decl merging. This is, of course, only for the call
- for streaming BLOCK_VARS, but other callers are safe. */
- /* ??? FIXME wrt SCC streaming. Drop these for now. */
+ for streaming BLOCK_VARS, but other callers are safe.
+ See also lto-streamer-out.c:DFS_write_tree_body. */
if (VAR_OR_FUNCTION_DECL_P (t)
&& DECL_EXTERNAL (t))
- ; /* stream_write_tree_shallow_non_ref (ob, t, ref_p); */
+ stream_write_tree_shallow_non_ref (ob, t, ref_p);
else
stream_write_tree (ob, t, ref_p);