From 35a3fa09ad2d51d4f65f9162372dad7a5735e599 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Mon, 17 Feb 2003 16:21:32 +0100 Subject: [PATCH] * recog.c (split_all_insns): Fix memory overflow. From-SVN: r62998 --- gcc/ChangeLog | 4 ++++ gcc/recog.c | 14 +++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2ce31e7d208..bb6f61dc05f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Mon Feb 17 16:16:54 CET 2003 Jan Hubicka + + * recog.c (split_all_insns): Fix memory overflow. + 2003-02-17 Kazu Hirata * config/h8300/h8300.md (cmpqi): Remove mode from compare. 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; } }