lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream DECL_FCONTEXT
authorJan Hubicka <hubicka@ucw.cz>
Thu, 12 Jul 2018 12:56:45 +0000 (14:56 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 12 Jul 2018 12:56:45 +0000 (12:56 +0000)
* 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

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

index 6332f29c8bc2939a81b09781eceb4086890621de..89d8fa87b3e19fcb0065537fcb78b6f644684cf7 100644 (file)
@@ -1,3 +1,13 @@
+2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
+
+       * 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  <rguenther@suse.de>
 
        PR debug/86462
index 5391027181bd2dee2d7189280c73835fc98b7b86..bdbe591f8a1618017450a0b7eb21a2ab0a7c22e9 100644 (file)
@@ -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<tree, hashval_t> *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))
index 149f558bac539e89c92a7996ae5c58e91b3dbaad..43cd9a4cad1323f1a208883302c4bfbd20755953 100644 (file)
@@ -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);
 }
 
 
index ba57b976c581be6c70b92258df034c28d30133f1..a68cd4b135bf9c44ea613952d8a2cf86a664a638 100644 (file)
@@ -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);
 }
 
 
index e906cdcc1e0e5ecf53d71d6a83e14fbdbf3d4367..bace9c8af2e3237e51f2a3f96afabfa1cedae8dd 100644 (file)
@@ -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;