From: Jan Hubicka Date: Thu, 12 Jul 2018 12:56:45 +0000 (+0200) Subject: lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream DECL_FCONTEXT X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d5cbbf873956db1c4eed15a88f935700e7d6012a;p=gcc.git lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream DECL_FCONTEXT * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream DECL_FCONTEXT (hash_tree): Do not hash DECL_FCONTEXT * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers): Do not stream DECL_FCONTEXT. * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise. * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT. From-SVN: r262585 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6332f29c8bc..89d8fa87b3e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2018-07-12 Jan Hubicka + + * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream + DECL_FCONTEXT + (hash_tree): Do not hash DECL_FCONTEXT + * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers): + Do not stream DECL_FCONTEXT. + * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise. + * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT. + 2018-07-12 Richard Biener PR debug/86462 diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index 5391027181b..bdbe591f8a1 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -832,7 +832,7 @@ DFS::DFS_write_tree_body (struct output_block *ob, DFS_follow_tree_edge (DECL_BIT_FIELD_TYPE (expr)); DFS_follow_tree_edge (DECL_BIT_FIELD_REPRESENTATIVE (expr)); DFS_follow_tree_edge (DECL_FIELD_BIT_OFFSET (expr)); - DFS_follow_tree_edge (DECL_FCONTEXT (expr)); + gcc_checking_assert (!DECL_FCONTEXT (expr)); } if (CODE_CONTAINS_STRUCT (code, TS_FUNCTION_DECL)) @@ -1249,7 +1249,6 @@ hash_tree (struct streamer_tree_cache_d *cache, hash_map *map, visit (DECL_BIT_FIELD_TYPE (t)); visit (DECL_BIT_FIELD_REPRESENTATIVE (t)); visit (DECL_FIELD_BIT_OFFSET (t)); - visit (DECL_FCONTEXT (t)); } if (CODE_CONTAINS_STRUCT (code, TS_FUNCTION_DECL)) diff --git a/gcc/tree-streamer-in.c b/gcc/tree-streamer-in.c index 149f558bac5..43cd9a4cad1 100644 --- a/gcc/tree-streamer-in.c +++ b/gcc/tree-streamer-in.c @@ -758,7 +758,6 @@ lto_input_ts_field_decl_tree_pointers (struct lto_input_block *ib, DECL_BIT_FIELD_TYPE (expr) = stream_read_tree (ib, data_in); DECL_BIT_FIELD_REPRESENTATIVE (expr) = stream_read_tree (ib, data_in); DECL_FIELD_BIT_OFFSET (expr) = stream_read_tree (ib, data_in); - DECL_FCONTEXT (expr) = stream_read_tree (ib, data_in); } diff --git a/gcc/tree-streamer-out.c b/gcc/tree-streamer-out.c index ba57b976c58..a68cd4b135b 100644 --- a/gcc/tree-streamer-out.c +++ b/gcc/tree-streamer-out.c @@ -646,7 +646,6 @@ write_ts_field_decl_tree_pointers (struct output_block *ob, tree expr, stream_write_tree (ob, DECL_BIT_FIELD_TYPE (expr), ref_p); stream_write_tree (ob, DECL_BIT_FIELD_REPRESENTATIVE (expr), ref_p); stream_write_tree (ob, DECL_FIELD_BIT_OFFSET (expr), ref_p); - stream_write_tree (ob, DECL_FCONTEXT (expr), ref_p); } diff --git a/gcc/tree.c b/gcc/tree.c index e906cdcc1e0..bace9c8af2e 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -5280,6 +5280,7 @@ free_lang_data_in_decl (tree decl) free_lang_data_in_one_sizepos (&DECL_SIZE_UNIT (decl)); if (TREE_CODE (decl) == FIELD_DECL) { + DECL_FCONTEXT (decl) = NULL; free_lang_data_in_one_sizepos (&DECL_FIELD_OFFSET (decl)); if (TREE_CODE (DECL_CONTEXT (decl)) == QUAL_UNION_TYPE) DECL_QUALIFIER (decl) = NULL_TREE;