diff options
author | Richard Biener <rguenther@suse.de> | 2012-12-13 11:13:13 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2012-12-13 11:13:13 +0000 |
commit | 3ecce8a1ff83d1462ced908c44c8179aee4c2852 (patch) | |
tree | 1a13d418fc3a703db9fbeb1004c23cdd2df5d5c5 /gcc/tree-streamer.c | |
parent | af50fec7f5470d177cbfa6158208097d178e099e (diff) | |
download | gcc-3ecce8a1ff83d1462ced908c44c8179aee4c2852.zip gcc-3ecce8a1ff83d1462ced908c44c8179aee4c2852.tar.gz gcc-3ecce8a1ff83d1462ced908c44c8179aee4c2852.tar.bz2 |
re PR lto/55660 (ICE instead of some warning during lto build with supplied different options (-funsigned-char vs none))
2012-12-13 Richard Biener <rguenther@suse.de>
PR lto/55660
* tree-streamer.c (record_common_node): Check that we are not
recursively pre-loading nodes we want to skip. Handle
char_type_node appearing as part of va_list_type_node.
* gcc.dg/lto/pr55660_0.c: New testcase.
* gcc.dg/lto/pr55660_1.c: Likewise.
From-SVN: r194473
Diffstat (limited to 'gcc/tree-streamer.c')
-rw-r--r-- | gcc/tree-streamer.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/tree-streamer.c b/gcc/tree-streamer.c index a6b7316..259e36b 100644 --- a/gcc/tree-streamer.c +++ b/gcc/tree-streamer.c @@ -237,6 +237,16 @@ streamer_tree_cache_lookup (struct streamer_tree_cache_d *cache, tree t, 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 |