aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2009-08-19 19:40:28 +0000
committerRichard Guenther <rguenther@suse.de>2009-08-19 19:40:28 +0000
commit10f563ba4821e389eeee371da53491c4affa06f6 (patch)
treeaefb712128f3765723b89fcf2a960a14cc1e683f /gcc/tree.c
parent0366793befd4eadb425a792fb43e1efe2339c3a6 (diff)
2009-08-19 Richard Guenther <rguenther@suse.de>
* lto-streamer.c (lto_get_common_nodes): Skip itk_char. * tree.c (free_lang_data): Merge char_type_node with the appropriately signed variant. lto/ * lto-lang.c (lto_init): Merge char_type_node with the appropriately signed variant. 2009-08-19 Richard Guenther <rguenther@suse.de> PR lto/41071 * gimple.c (gimple_get_alias_set): Pointers to CV qualified variants have the same alias-set as unqualified variants. 2009-08-19 Richard Guenther <rguenther@suse.de> PR lto/41071 * gimple.c (gimple_register_type): Unlink a pointer from its pointer chain if we will use a different type for it. * lto-streamer-out.c (lto_output_ts_type_tree_pointers): Do not output TYPE_POINTER_TO, TYPE_REFERENCE_TO and TYPE_NEXT_PTR/REF_TO. * lto-streamer-in.c (lto_input_ts_type_tree_pointers): Do not input TYPE_POINTER_TO, TYPE_REFERENCE_TO and TYPE_NEXT_PTR/REF_TO. lto/ * lto.c (lto_fixup_common): Re-build the pointer-to chain part one. (lto_fixup_type): Re-build the pointer-to chain part two. 2009-08-19 Richard Guenther <rguenther@suse.de> PR lto/41071 * gimple.c (gimple_register_type): Unlink a non-main-variant from its variant chain if we will use a different type for it. * tree.c (free_lang_data_in_type): Do not free the variant chains. * lto-streamer-out.c (lto_output_ts_type_tree_pointers): Do not output TYPE_NEXT_VARIANT. * lto-streamer-in.c (lto_input_ts_type_tree_pointers): Do not input TYPE_NEXT_VARIANT. lto/ * lto.c (lto_fixup_type): Re-build the type variant chain. 2009-08-19 Richard Guenther <rguenther@suse.de> PR lto/41071 * gimple.c (compare_type_names_p): Do not look at the types main variant. * lto-streamer-out.c (output_type_ref): Remove hack for char_type_node. * lto-streamer.c (lto_streamer_cache_insert_1): Remove hack for char_type_node. (lto_record_common_node): Canonicalize types of nodes we record. (lto_get_common_nodes): Record integer and size types first. Defer to lto_record_common_node for registering and canonicalizing types. lto/ * lto.c (lto_fixup_constructor): New function. (lto_fixup_tree): Replace all types. Properly fixup constructors and constants. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/lto@150943 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index bac78a3be39..193a4ae02a9 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -4222,16 +4222,6 @@ free_lang_data_in_type (tree type)
/* FIXME lto: This will break debug info generation. */
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;
}
@@ -4794,6 +4784,12 @@ free_lang_data (void)
boolean_true_node = TYPE_MAX_VALUE (boolean_type_node);
}
+ /* To make units with different flag_signed_char settings work together
+ re-set the char_type_node pointer to whatever is appropriate for
+ this unit. */
+ char_type_node
+ = flag_signed_char ? signed_char_type_node : unsigned_char_type_node;
+
/* Reset some langhooks. */
lang_hooks.callgraph.analyze_expr = NULL;
lang_hooks.types_compatible_p = NULL;