tree.c (fld_incomplete_type_of): Clear TYPE_FINAL_P, TYPE_EMPTY_P, ENUM_IS_OPAQUE...
authorJan Hubicka <hubicka@ucw.cz>
Sat, 9 Nov 2019 21:33:55 +0000 (22:33 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sat, 9 Nov 2019 21:33:55 +0000 (21:33 +0000)
* tree.c (fld_incomplete_type_of): Clear TYPE_FINAL_P, TYPE_EMPTY_P,
ENUM_IS_OPAQUE and ENUM_IS_SCOPED.
(free_lang_data_in_binfo): Clear TREE_PUBLIC in BINFO
(free_lang_data_in_type): Clear ENUM_IS_OPAQUE and ENUM_IS_SCOPED.

From-SVN: r278008

gcc/ChangeLog
gcc/tree.c

index 1a1c68c..d5a9190 100644 (file)
@@ -1,5 +1,12 @@
 2019-11-09  Jan Hubicka  <hubicka@ucw.cz>
 
+       * tree.c (fld_incomplete_type_of): Clear TYPE_FINAL_P, TYPE_EMPTY_P,
+       ENUM_IS_OPAQUE and ENUM_IS_SCOPED.
+       (free_lang_data_in_binfo): Clear TREE_PUBLIC in BINFO
+       (free_lang_data_in_type): Clear ENUM_IS_OPAQUE and ENUM_IS_SCOPED.
+
+2019-11-09  Jan Hubicka  <hubicka@ucw.cz>
+
        * ipa-inline-analysis.c (do_estimate_growth_1): Add support for
        capping the growth cumulated.
        (offline_size): Break out from ...
index d2c9fe3..d6a3970 100644 (file)
@@ -5387,9 +5387,15 @@ fld_incomplete_type_of (tree t, class free_lang_data_d *fld)
              TYPE_TYPELESS_STORAGE (copy) = 0;
              TYPE_FIELDS (copy) = NULL;
              TYPE_BINFO (copy) = NULL;
+             TYPE_FINAL_P (copy) = 0;
+             TYPE_EMPTY_P (copy) = 0;
            }
          else
-           TYPE_VALUES (copy) = NULL;
+           {
+             TYPE_VALUES (copy) = NULL;
+             ENUM_IS_OPAQUE (copy) = 0;
+             ENUM_IS_SCOPED (copy) = 0;
+           }
 
          /* Build copy of TYPE_DECL in TYPE_NAME if necessary.
             This is needed for ODR violation warnings to come out right (we
@@ -5472,6 +5478,7 @@ free_lang_data_in_binfo (tree binfo)
   BINFO_INHERITANCE_CHAIN (binfo) = NULL_TREE;
   BINFO_SUBVTT_INDEX (binfo) = NULL_TREE;
   BINFO_VPTR_FIELD (binfo) = NULL_TREE;
+  TREE_PUBLIC (binfo) = 0;
 
   FOR_EACH_VEC_ELT (*BINFO_BASE_BINFOS (binfo), i, t)
     free_lang_data_in_binfo (t);
@@ -5573,6 +5580,8 @@ free_lang_data_in_type (tree type, class free_lang_data_d *fld)
     {
       if (TREE_CODE (type) == ENUMERAL_TYPE)
        {
+         ENUM_IS_OPAQUE (type) = 0;
+         ENUM_IS_SCOPED (type) = 0;
          /* Type values are used only for C++ ODR checking.  Drop them
             for all type variants and non-ODR types.
             For ODR types the data is freed in free_odr_warning_data.  */