Commit 728b26bb by Diego Novillo Committed by Diego Novillo

re PR middle-end/25990 (gomp ICE with -fopenmp)


	PR 25990
	* 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.

From-SVN: r110511
parent c503a0c0
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> 2006-02-01 Steve Ellcey <sje@cup.hp.com>
PR middle-end/24901 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> 2006-01-31 Mark Mitchell <mark@codesourcery.com>
PR c++/25342 PR c++/25342
...@@ -4656,7 +4656,8 @@ move_block_to_fn (struct function *dest_cfun, basic_block bb, ...@@ -4656,7 +4656,8 @@ move_block_to_fn (struct function *dest_cfun, basic_block bb,
edge e; edge e;
block_stmt_iterator si; block_stmt_iterator si;
struct move_stmt_d d; struct move_stmt_d d;
unsigned sz; unsigned old_len, new_len;
basic_block *addr;
/* Link BB to the new linked list. */ /* Link BB to the new linked list. */
move_block_after (bb, after); move_block_after (bb, after);
...@@ -4679,11 +4680,13 @@ move_block_to_fn (struct function *dest_cfun, basic_block bb, ...@@ -4679,11 +4680,13 @@ move_block_to_fn (struct function *dest_cfun, basic_block bb,
if (bb->index > cfg->x_last_basic_block) if (bb->index > cfg->x_last_basic_block)
cfg->x_last_basic_block = bb->index; cfg->x_last_basic_block = bb->index;
sz = VEC_length (basic_block, cfg->x_basic_block_info); old_len = VEC_length (basic_block, cfg->x_basic_block_info);
if ((unsigned) cfg->x_last_basic_block >= sz) if ((unsigned) cfg->x_last_basic_block >= old_len)
{ {
sz = cfg->x_last_basic_block + (cfg->x_last_basic_block + 3) / 4; 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, sz); 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,
...@@ -4708,7 +4711,6 @@ move_block_to_fn (struct function *dest_cfun, basic_block bb, ...@@ -4708,7 +4711,6 @@ move_block_to_fn (struct function *dest_cfun, basic_block bb,
if (TREE_CODE (stmt) == LABEL_EXPR) if (TREE_CODE (stmt) == LABEL_EXPR)
{ {
unsigned old_len;
tree label = LABEL_EXPR_LABEL (stmt); tree label = LABEL_EXPR_LABEL (stmt);
int uid = LABEL_DECL_UID (label); int uid = LABEL_DECL_UID (label);
...@@ -4717,8 +4719,7 @@ move_block_to_fn (struct function *dest_cfun, basic_block bb, ...@@ -4717,8 +4719,7 @@ move_block_to_fn (struct function *dest_cfun, basic_block bb,
old_len = VEC_length (basic_block, cfg->x_label_to_block_map); old_len = VEC_length (basic_block, cfg->x_label_to_block_map);
if (old_len <= (unsigned) uid) if (old_len <= (unsigned) uid)
{ {
basic_block *addr; new_len = 3 * uid / 2;
unsigned new_len = 3 * uid / 2;
VEC_safe_grow (basic_block, gc, cfg->x_label_to_block_map, VEC_safe_grow (basic_block, gc, cfg->x_label_to_block_map,
new_len); new_len);
addr = VEC_address (basic_block, cfg->x_label_to_block_map); addr = VEC_address (basic_block, cfg->x_label_to_block_map);
......
Markdown is supported
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