Commit cef83dae authored by Michael Beck's avatar Michael Beck
Browse files

- BugFix: the end block might be unreachable, check this first

[r25700]
parent e0a2eca7
...@@ -1858,11 +1858,19 @@ static int insert_Load(block_t *bl) { ...@@ -1858,11 +1858,19 @@ static int insert_Load(block_t *bl) {
unsigned pos = 0; unsigned pos = 0;
unsigned end = env.rbs_size - 1; unsigned end = env.rbs_size - 1;
int res = 0; int res = 0;
ir_node *pred = get_Block_cfgpred_block(bl->block, 0); ir_node *pred;
block_t *pred_bl = get_block_entry(pred); block_t *pred_bl;
DB((dbg, LEVEL_3, "processing %+F\n", block)); DB((dbg, LEVEL_3, "processing %+F\n", block));
if (n == 0) {
/* might still happen for an unreachable block (end for instance) */
return res;
}
pred = get_Block_cfgpred_block(bl->block, 0);
pred_bl = get_block_entry(pred);
rbitset_cpy(env.curr_set, pred_bl->avail_out, env.rbs_size); rbitset_cpy(env.curr_set, pred_bl->avail_out, env.rbs_size);
if (n > 1) { if (n > 1) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment