lto-streamer-out.c (DFS::DFS_write_tree_body): Process DECL_DEBUG_EXPR conditional...
authorRichard Biener <rguenther@suse.de>
Fri, 12 Jan 2018 08:22:16 +0000 (08:22 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 12 Jan 2018 08:22:16 +0000 (08:22 +0000)
2018-01-12  Richard Biener  <rguenther@suse.de>

* lto-streamer-out.c (DFS::DFS_write_tree_body): Process
DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
* tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
Likewise.
* tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.

From-SVN: r256563

gcc/ChangeLog
gcc/lto-streamer-out.c
gcc/tree-streamer-in.c
gcc/tree-streamer-out.c

index b04df1cf4764c84147e96e6412a9af464f848140..db405821480f58570a82cb0ccc94ac0e563f18c1 100644 (file)
@@ -1,3 +1,11 @@
+2018-01-12  Richard Biener  <rguenther@suse.de>
+
+       * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
+       DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
+       * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
+       Likewise.
+       * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
+
 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
        * configure.ac (--with-long-double-format): Add support for the
index 8ffcecd494cc7cc03f4956f604a45234bcc67ece..84b71bd23587ffc206b9bc05043c702243f40ac0 100644 (file)
@@ -802,7 +802,8 @@ DFS::DFS_write_tree_body (struct output_block *ob,
           || TREE_CODE (expr) == PARM_DECL)
          && DECL_HAS_VALUE_EXPR_P (expr))
        DFS_follow_tree_edge (DECL_VALUE_EXPR (expr));
-      if (VAR_P (expr))
+      if (VAR_P (expr)
+         && DECL_HAS_DEBUG_EXPR_P (expr))
        DFS_follow_tree_edge (DECL_DEBUG_EXPR (expr));
     }
 
index e1de79a84cb3e7b4626c6faec053d7df3ec370c2..912fa5f0f02561098594ec7c1d98fa6e2b3c5c3b 100644 (file)
@@ -714,7 +714,8 @@ lto_input_ts_decl_common_tree_pointers (struct lto_input_block *ib,
       && DECL_HAS_VALUE_EXPR_P (expr))
     SET_DECL_VALUE_EXPR (expr, stream_read_tree (ib, data_in));
 
-  if (VAR_P (expr))
+  if (VAR_P (expr)
+      && DECL_HAS_DEBUG_EXPR_P (expr))
     {
       tree dexpr = stream_read_tree (ib, data_in);
       if (dexpr)
index 36431c0ee0efff32b0c49128c22754288d0ed5e3..03145b4cf58b332cb0a78d8ed742c1b488d31b40 100644 (file)
@@ -609,7 +609,8 @@ write_ts_decl_common_tree_pointers (struct output_block *ob, tree expr,
       && DECL_HAS_VALUE_EXPR_P (expr))
     stream_write_tree (ob, DECL_VALUE_EXPR (expr), ref_p);
 
-  if (VAR_P (expr))
+  if (VAR_P (expr)
+      && DECL_HAS_DEBUG_EXPR_P (expr))
     stream_write_tree (ob, DECL_DEBUG_EXPR (expr), ref_p);
 }