* tree-cfg.c (move_block_to_fn): Release bb from dominance
info. Update last_basic_block correctly.
From-SVN: r124257
+2007-04-28 Zdenek Dvorak <dvorakz@suse.cz>
+
+ * tree-cfg.c (move_block_to_fn): Release bb from dominance
+ info. Update last_basic_block correctly.
+
2007-04-27 Kaz Kojima <kkojima@gcc.gnu.org>
PR target/31701
2007-04-27 Kaz Kojima <kkojima@gcc.gnu.org>
PR target/31701
struct move_stmt_d d;
unsigned old_len, new_len;
struct move_stmt_d d;
unsigned old_len, new_len;
+ /* Remove BB from dominance structures. */
+ delete_from_dominance_info (CDI_DOMINATORS, bb);
+
/* Link BB to the new linked list. */
move_block_after (bb, after);
/* Link BB to the new linked list. */
move_block_after (bb, after);
/* Grow DEST_CFUN's basic block array if needed. */
cfg = dest_cfun->cfg;
cfg->x_n_basic_blocks++;
/* Grow DEST_CFUN's basic block array if needed. */
cfg = dest_cfun->cfg;
cfg->x_n_basic_blocks++;
- if (bb->index > cfg->x_last_basic_block)
- cfg->x_last_basic_block = bb->index;
+ if (bb->index >= cfg->x_last_basic_block)
+ cfg->x_last_basic_block = bb->index + 1;
old_len = VEC_length (basic_block, cfg->x_basic_block_info);
if ((unsigned) cfg->x_last_basic_block >= old_len)
old_len = VEC_length (basic_block, cfg->x_basic_block_info);
if ((unsigned) cfg->x_last_basic_block >= old_len)