diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-06-04 16:20:36 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-06-04 16:20:36 +0000 |
commit | 29413d70badb1daeb5fab4dc483ca1cad9de796e (patch) | |
tree | 08154b04ddcdd9c66f3ff68d546a4ce4f075c4d5 /gcc/lto-cgraph.c | |
parent | 90b4072592cf08eda903e3bb28a143105e66c73e (diff) | |
download | gcc-29413d70badb1daeb5fab4dc483ca1cad9de796e.tar.gz |
PR lto/48954
* lto-cgraph.c (output_node_opt_summary): Handle NULL skip args bitmaps.
* g++.dg/torture/pr48954.C: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174644 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-cgraph.c')
-rw-r--r-- | gcc/lto-cgraph.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c index 1d2f92e9d1e..3b1115b53f6 100644 --- a/gcc/lto-cgraph.c +++ b/gcc/lto-cgraph.c @@ -1598,14 +1598,24 @@ output_node_opt_summary (struct output_block *ob, int i; struct cgraph_edge *e; - lto_output_uleb128_stream (ob->main_stream, - bitmap_count_bits (node->clone.args_to_skip)); - EXECUTE_IF_SET_IN_BITMAP (node->clone.args_to_skip, 0, index, bi) - lto_output_uleb128_stream (ob->main_stream, index); - lto_output_uleb128_stream (ob->main_stream, - bitmap_count_bits (node->clone.combined_args_to_skip)); - EXECUTE_IF_SET_IN_BITMAP (node->clone.combined_args_to_skip, 0, index, bi) - lto_output_uleb128_stream (ob->main_stream, index); + if (node->clone.args_to_skip) + { + lto_output_uleb128_stream (ob->main_stream, + bitmap_count_bits (node->clone.args_to_skip)); + EXECUTE_IF_SET_IN_BITMAP (node->clone.args_to_skip, 0, index, bi) + lto_output_uleb128_stream (ob->main_stream, index); + } + else + lto_output_uleb128_stream (ob->main_stream, 0); + if (node->clone.combined_args_to_skip) + { + lto_output_uleb128_stream (ob->main_stream, + bitmap_count_bits (node->clone.combined_args_to_skip)); + EXECUTE_IF_SET_IN_BITMAP (node->clone.combined_args_to_skip, 0, index, bi) + lto_output_uleb128_stream (ob->main_stream, index); + } + else + lto_output_uleb128_stream (ob->main_stream, 0); lto_output_uleb128_stream (ob->main_stream, VEC_length (ipa_replace_map_p, node->clone.tree_map)); FOR_EACH_VEC_ELT (ipa_replace_map_p, node->clone.tree_map, i, map) |