This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] for PR 31771
- From: Zdenek Dvorak <rakdver at kam dot mff dot cuni dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Cc: rguenther at suse dot de
- Date: Wed, 2 May 2007 23:01:11 +0200
- Subject: [patch] for PR 31771
Hello,
in move_block_to_fn, we assign copied blocks to the basic_block_info
array with last_basic_block index, instead of the real index of the
block, thus causing this bug. Bootstrapped & regtested on i686.
Zdenek
PR tree-optimization/31771
* tree-cfg.c (move_block_to_fn): Assign bb to the correct index.
Index: tree-cfg.c
===================================================================
*** tree-cfg.c (revision 124351)
--- tree-cfg.c (working copy)
*************** move_block_to_fn (struct function *dest_
*** 4624,4630 ****
}
VEC_replace (basic_block, cfg->x_basic_block_info,
! cfg->x_last_basic_block, bb);
/* The statements in BB need to be associated with a new TREE_BLOCK.
Labels need to be associated with a new label-to-block map. */
--- 4624,4630 ----
}
VEC_replace (basic_block, cfg->x_basic_block_info,
! bb->index, bb);
/* The statements in BB need to be associated with a new TREE_BLOCK.
Labels need to be associated with a new label-to-block map. */