diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-02-17 15:21:32 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-02-17 15:21:32 +0000 |
commit | 34e8b93e65c82692a38fc81398812d268dcbf06f (patch) | |
tree | 8baa63521dc2e4d2a19b829e3d2256baba739f1b /gcc/recog.c | |
parent | 04767da6939c512a3757b9225fae9b4f94b2febf (diff) | |
download | gcc-34e8b93e65c82692a38fc81398812d268dcbf06f.tar.gz |
* recog.c (split_all_insns): Fix memory overflow.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62998 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/recog.c')
-rw-r--r-- | gcc/recog.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gcc/recog.c b/gcc/recog.c index bfa988b4b16..6206be1700c 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -2882,10 +2882,18 @@ split_all_insns (upd_life) find_many_sub_basic_blocks (blocks); - while (old_last_basic_block < last_basic_block) + if (old_last_basic_block != last_basic_block && upd_life) { - SET_BIT (blocks, old_last_basic_block); - old_last_basic_block++; + sbitmap new_blocks = sbitmap_alloc (last_basic_block); + + sbitmap_copy (new_blocks, blocks); + while (old_last_basic_block < last_basic_block) + { + SET_BIT (new_blocks, old_last_basic_block); + old_last_basic_block++; + } + sbitmap_free (blocks); + new_blocks = blocks; } } |