Commit 2f697bc4 by Richard Guenther Committed by Richard Biener

re PR middle-end/42229 (cancel_loop_tree: bad read causes ice)

2009-12-02  Richard Guenther  <rguenther@suse.de>

	PR middle-end/42229
	* cfgloopmanip.c (remove_path): Avoid cancelling loops
	twice.

From-SVN: r154914
parent ca6f6174
2009-12-02 Richard Guenther <rguenther@suse.de>
PR middle-end/42229
* cfgloopmanip.c (remove_path): Avoid cancelling loops
twice.
2009-12-02 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
PR middle-end/42224
......@@ -278,10 +278,9 @@ remove_path (edge e)
edge ae;
basic_block *rem_bbs, *bord_bbs, from, bb;
VEC (basic_block, heap) *dom_bbs;
int i, nrem, n_bord_bbs, nreml;
int i, nrem, n_bord_bbs;
sbitmap seen;
bool irred_invalidated = false;
struct loop **deleted_loop;
if (!can_remove_branch_p (e))
return false;
......@@ -342,15 +341,9 @@ remove_path (edge e)
dom_bbs = NULL;
/* Cancel loops contained in the path. */
deleted_loop = XNEWVEC (struct loop *, nrem);
nreml = 0;
for (i = 0; i < nrem; i++)
if (rem_bbs[i]->loop_father->header == rem_bbs[i])
deleted_loop[nreml++] = rem_bbs[i]->loop_father;
for (i = 0; i < nreml; i++)
cancel_loop_tree (deleted_loop[i]);
free (deleted_loop);
cancel_loop_tree (rem_bbs[i]->loop_father);
remove_bbs (rem_bbs, nrem);
free (rem_bbs);
......
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