tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO and TYPE_NEXT_REF_TO.
authorJan Hubicka <jh@suse.cz>
Thu, 30 Aug 2018 12:32:45 +0000 (14:32 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 30 Aug 2018 12:32:45 +0000 (12:32 +0000)
* tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
and TYPE_NEXT_REF_TO.

From-SVN: r263978

gcc/ChangeLog
gcc/tree.c

index f7fb162f92553b3efc0e550cd3dd69603f42f53d..fa2339b170c92d02ea785791afa243059c016f1e 100644 (file)
@@ -1,3 +1,17 @@
+2018-08-29  Jan Hubicka  <jh@suse.cz>
+
+       * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
+       and TYPE_NEXT_REF_TO.
+
+2018-08-29  Jan Hubicka  <jh@suse.cz>
+
+       * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
+       comment that it has to be even number.
+       (class sreal): Change m_sig type to int32_t.
+       * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
+       int64_t for temporary calculations.
+       (sreal_verify_basics): Drop one bit from minimum and maximum.
+
 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
 
        * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
index d1e1b3048d4bbb300c0f9e23b849bd307a07a8c6..c3ac8f36d55e7f10132e20f75bb9766f2d68aa6b 100644 (file)
@@ -5519,9 +5519,14 @@ find_decls_types_r (tree *tp, int *ws, void *data)
       fld_worklist_push (TYPE_POINTER_TO (t), fld);
       fld_worklist_push (TYPE_REFERENCE_TO (t), fld);
       fld_worklist_push (TYPE_NAME (t), fld);
-      /* Do not walk TYPE_NEXT_PTR_TO or TYPE_NEXT_REF_TO.  We do not stream
-        them and thus do not and want not to reach unused pointer types
-        this way.  */
+      /* While we do not stream TYPE_POINTER_TO and TYPE_REFERENCE_TO
+        lists, we may look types up in these lists and use them while
+        optimizing the function body.  Thus we need to free lang data
+        in them.  */
+      if (TREE_CODE (t) == POINTER_TYPE)
+        fld_worklist_push (TYPE_NEXT_PTR_TO (t), fld);
+      if (TREE_CODE (t) == REFERENCE_TYPE)
+        fld_worklist_push (TYPE_NEXT_REF_TO (t), fld);
       if (!POINTER_TYPE_P (t))
        fld_worklist_push (TYPE_MIN_VALUE_RAW (t), fld);
       /* TYPE_MAX_VALUE_RAW is TYPE_BINFO for record types.  */