aboutsummaryrefslogtreecommitdiff
path: root/gcc/flow.c
diff options
context:
space:
mode:
authorKenneth Zadeck <zadeck@gcc.gnu.org>2005-12-19 02:35:44 +0000
committerKenneth Zadeck <zadeck@gcc.gnu.org>2005-12-19 02:35:44 +0000
commit3d5f877adf14a980c6bc38a5f93ecb25c1f5c553 (patch)
tree0b4ed2d9a152aff6f7733ec523309ca8eb5951d1 /gcc/flow.c
parentfd0bd278031c12e1148fb28b4fd66849cfe61781 (diff)
downloadgcc-3d5f877adf14a980c6bc38a5f93ecb25c1f5c553.zip
gcc-3d5f877adf14a980c6bc38a5f93ecb25c1f5c553.tar.gz
gcc-3d5f877adf14a980c6bc38a5f93ecb25c1f5c553.tar.bz2
flow.c (update_life_info, [...]): Fixed latent bug that could happen if update_life_info was called with a blocks...
2005-12-17 Kenneth Zadeck <zadeck@naturalbridge.com> * flow.c (update_life_info, count_or_remove_death_notes): Fixed latent bug that could happen if update_life_info was called with a blocks parameter and the call to cleanup_cfg actually deleted one of those blocks. From-SVN: r108777
Diffstat (limited to 'gcc/flow.c')
-rw-r--r--gcc/flow.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/gcc/flow.c b/gcc/flow.c
index 436bfd7..ca2f1e1 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -658,12 +658,16 @@ update_life_info (sbitmap blocks, enum update_life_extent extent,
EXECUTE_IF_SET_IN_SBITMAP (blocks, 0, i, sbi)
{
bb = BASIC_BLOCK (i);
-
- COPY_REG_SET (tmp, bb->il.rtl->global_live_at_end);
- propagate_block (bb, tmp, NULL, NULL, stabilized_prop_flags);
-
- if (extent == UPDATE_LIFE_LOCAL)
- verify_local_live_at_start (tmp, bb);
+ if (bb)
+ {
+ /* The bitmap may be flawed in that one of the basic
+ blocks may have been deleted before you get here. */
+ COPY_REG_SET (tmp, bb->il.rtl->global_live_at_end);
+ propagate_block (bb, tmp, NULL, NULL, stabilized_prop_flags);
+
+ if (extent == UPDATE_LIFE_LOCAL)
+ verify_local_live_at_start (tmp, bb);
+ }
};
}
else
@@ -4456,7 +4460,11 @@ count_or_remove_death_notes (sbitmap blocks, int kill)
EXECUTE_IF_SET_IN_SBITMAP (blocks, 0, i, sbi)
{
- count += count_or_remove_death_notes_bb (BASIC_BLOCK (i), kill);
+ basic_block bb = BASIC_BLOCK (i);
+ /* The bitmap may be flawed in that one of the basic blocks
+ may have been deleted before you get here. */
+ if (bb)
+ count += count_or_remove_death_notes_bb (bb, kill);
};
}
else