* tree-cfg.c (move_block_to_fn): Clear out the basic block
array after growing it.
testsuite/
PR 25990
* gcc.dg/gomp/pr25990.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110511
138bc75d-0d04-0410-961f-
82ee72b054a4
+2006-02-02 Diego Novillo <dnovillo@redhat.com>
+
+ PR 25990
+ * tree-cfg.c (move_block_to_fn): Clear out the basic block
+ array after growing it.
+
2006-02-01 Steve Ellcey <sje@cup.hp.com>
PR middle-end/24901
2006-02-01 Steve Ellcey <sje@cup.hp.com>
PR middle-end/24901
+2006-02-02 Diego Novillo <dnovillo@redhat.com>
+
+ PR 25990
+ * gcc.dg/gomp/pr25990.c: New test.
+
2006-01-31 Mark Mitchell <mark@codesourcery.com>
PR c++/25342
2006-01-31 Mark Mitchell <mark@codesourcery.com>
PR c++/25342
edge e;
block_stmt_iterator si;
struct move_stmt_d d;
edge e;
block_stmt_iterator si;
struct move_stmt_d d;
+ unsigned old_len, new_len;
+ basic_block *addr;
/* Link BB to the new linked list. */
move_block_after (bb, after);
/* Link BB to the new linked list. */
move_block_after (bb, after);
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;
- sz = VEC_length (basic_block, cfg->x_basic_block_info);
- if ((unsigned) cfg->x_last_basic_block >= sz)
+ old_len = VEC_length (basic_block, cfg->x_basic_block_info);
+ if ((unsigned) cfg->x_last_basic_block >= old_len)
- sz = cfg->x_last_basic_block + (cfg->x_last_basic_block + 3) / 4;
- VEC_safe_grow (basic_block, gc, cfg->x_basic_block_info, sz);
+ new_len = cfg->x_last_basic_block + (cfg->x_last_basic_block + 3) / 4;
+ VEC_safe_grow (basic_block, gc, cfg->x_basic_block_info, new_len);
+ addr = VEC_address (basic_block, cfg->x_basic_block_info);
+ memset (&addr[old_len], 0, sizeof (basic_block) * (new_len - old_len));
}
VEC_replace (basic_block, cfg->x_basic_block_info,
}
VEC_replace (basic_block, cfg->x_basic_block_info,
if (TREE_CODE (stmt) == LABEL_EXPR)
{
if (TREE_CODE (stmt) == LABEL_EXPR)
{
tree label = LABEL_EXPR_LABEL (stmt);
int uid = LABEL_DECL_UID (label);
tree label = LABEL_EXPR_LABEL (stmt);
int uid = LABEL_DECL_UID (label);
old_len = VEC_length (basic_block, cfg->x_label_to_block_map);
if (old_len <= (unsigned) uid)
{
old_len = VEC_length (basic_block, cfg->x_label_to_block_map);
if (old_len <= (unsigned) uid)
{
- basic_block *addr;
- unsigned new_len = 3 * uid / 2;
VEC_safe_grow (basic_block, gc, cfg->x_label_to_block_map,
new_len);
addr = VEC_address (basic_block, cfg->x_label_to_block_map);
VEC_safe_grow (basic_block, gc, cfg->x_label_to_block_map,
new_len);
addr = VEC_address (basic_block, cfg->x_label_to_block_map);