* tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
authorJan Hubicka <hubicka@ucw.cz>
Fri, 22 Jun 2018 09:45:54 +0000 (11:45 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Fri, 22 Jun 2018 09:45:54 +0000 (09:45 +0000)
From-SVN: r261883

gcc/ChangeLog
gcc/tree.c

index 242c27d892bdfb599e461f2eb68b8fb09e2614f3..89b8f92dbaa922d0c9280e4ea2d3656e2a65bda2 100644 (file)
@@ -1,3 +1,7 @@
+2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
+
+       * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
+
 2018-06-22  Martin Liska  <mliska@suse.cz>
 
        * symbol-summary.h (get): Make it pure and inline move
index 608ca7e5abd9ebb722cf13bc4f5746ba6c661a08..1cb51766aa8003f368b111db891250ee1df9215e 100644 (file)
@@ -5134,10 +5134,7 @@ free_lang_data_in_type (tree type)
        else
          *prev = DECL_CHAIN (member);
 
-      /* FIXME: C FE uses TYPE_VFIELD to record C_TYPE_INCOMPLETE_VARS
-        and danagle the pointer from time to time.  */
-      if (TYPE_VFIELD (type) && TREE_CODE (TYPE_VFIELD (type)) != FIELD_DECL)
-        TYPE_VFIELD (type) = NULL_TREE;
+      TYPE_VFIELD (type) = NULL_TREE;
 
       if (TYPE_BINFO (type))
        {