aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-streamer.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-streamer.c')
-rw-r--r--gcc/tree-streamer.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/tree-streamer.c b/gcc/tree-streamer.c
index 94d540b5984..8e0a917f96a 100644
--- a/gcc/tree-streamer.c
+++ b/gcc/tree-streamer.c
@@ -251,6 +251,16 @@ streamer_tree_cache_get (struct streamer_tree_cache_d *cache, unsigned ix)
static void
record_common_node (struct streamer_tree_cache_d *cache, tree node)
{
+ /* If we recursively end up at nodes we do not want to preload simply don't.
+ ??? We'd want to verify that this doesn't happen, or alternatively
+ do not recurse at all. */
+ if (node == char_type_node)
+ return;
+
+ gcc_checking_assert (node != boolean_type_node
+ && node != boolean_true_node
+ && node != boolean_false_node);
+
/* We have to make sure to fill exactly the same number of
elements for all frontends. That can include NULL trees.
As our hash table can't deal with zero entries we'll simply stream