From c1a7ca7c790d4720dc4aecfae5a663cb685eb9cb Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 12 Jan 2018 08:22:16 +0000 Subject: [PATCH] lto-streamer-out.c (DFS::DFS_write_tree_body): Process DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P. 2018-01-12 Richard Biener * 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 | 8 ++++++++ gcc/lto-streamer-out.c | 3 ++- gcc/tree-streamer-in.c | 3 ++- gcc/tree-streamer-out.c | 3 ++- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b04df1cf476..db405821480 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2018-01-12 Richard Biener + + * 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 * configure.ac (--with-long-double-format): Add support for the diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index 8ffcecd494c..84b71bd2358 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -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)); } diff --git a/gcc/tree-streamer-in.c b/gcc/tree-streamer-in.c index e1de79a84cb..912fa5f0f02 100644 --- a/gcc/tree-streamer-in.c +++ b/gcc/tree-streamer-in.c @@ -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) diff --git a/gcc/tree-streamer-out.c b/gcc/tree-streamer-out.c index 36431c0ee0e..03145b4cf58 100644 --- a/gcc/tree-streamer-out.c +++ b/gcc/tree-streamer-out.c @@ -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); } -- 2.30.2