tree.c (free_lang_data_in_type): Do not free the type variant chains.
authorRichard Guenther <rguenther@suse.de>
Wed, 9 Sep 2009 09:30:26 +0000 (09:30 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 9 Sep 2009 09:30:26 +0000 (09:30 +0000)
2009-09-09  Richard Guenther  <rguenther@suse.de>

* tree.c (free_lang_data_in_type): Do not free the type variant
chains.
(free_lang_data): Merge char_type_node with its properly signed
variant.
(pass_ipa_free): Collect after freeing language specific data.

From-SVN: r151558

gcc/ChangeLog
gcc/tree.c

index f0be5934a06f5cfb34ca2f9f2c28f61f7dc11dc9..e6f096a01b3f37bda731dc4112b37e7024341d19 100644 (file)
@@ -1,3 +1,11 @@
+2009-09-09  Richard Guenther  <rguenther@suse.de>
+
+       * tree.c (free_lang_data_in_type): Do not free the type variant
+       chains.
+       (free_lang_data): Merge char_type_node with its properly signed
+       variant.
+       (pass_ipa_free): Collect after freeing language specific data.
+
 2009-09-09  Michael Matz  <matz@suse.de>
 
        PR middle-end/41268
index 010aeff2f579644600c50b21aa3b84fbc6daa63e..17009c6b8e495b89a94b04c97de74ae05cd4415c 100644 (file)
@@ -4238,16 +4238,6 @@ free_lang_data_in_type (tree type)
 
   TYPE_CONTEXT (type) = NULL_TREE;
   TYPE_STUB_DECL (type) = NULL_TREE;
-
-  /* Remove type variants other than the main variant.  This is both
-     wasteful and it may introduce infinite loops when the types are
-     read from disk and merged (since the variant will be the same
-     type as the main variant, traversing type variants will get into
-     an infinite loop).  */
-  if (TYPE_MAIN_VARIANT (type))
-    TYPE_NEXT_VARIANT (TYPE_MAIN_VARIANT (type)) = NULL_TREE;
-
-  TYPE_NEXT_VARIANT (type) = NULL_TREE;
 }
 
 
@@ -4856,6 +4846,12 @@ free_lang_data (void)
       boolean_true_node = TYPE_MAX_VALUE (boolean_type_node);
     }
 
+  /* Unify char_type_node with its properly signed variant.  */
+  if (TYPE_UNSIGNED (char_type_node))
+    unsigned_char_type_node = char_type_node;
+  else
+    signed_char_type_node = char_type_node;
+
   /* Reset some langhooks.  */
   lang_hooks.callgraph.analyze_expr = NULL;
   lang_hooks.types_compatible_p = NULL;
@@ -4898,7 +4894,7 @@ struct simple_ipa_opt_pass pass_ipa_free_lang_data =
   0,                                   /* properties_provided */
   0,                                   /* properties_destroyed */
   0,                                   /* todo_flags_start */
-  0                                    /* todo_flags_finish */
+  TODO_ggc_collect                     /* todo_flags_finish */
  }
 };