Commit e4658728 by Richard Guenther Committed by Richard Biener

tree-ssa-reassoc.c (reassociate_bb): Properly reset the statement iterator after statement removal.

2008-08-18  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-reassoc.c (reassociate_bb): Properly reset the
	statement iterator after statement removal.

From-SVN: r139201
parent 5289e808
2008-08-18 Richard Guenther <rguenther@suse.de>
* tree-ssa-reassoc.c (reassociate_bb): Properly reset the
statement iterator after statement removal.
2008-08-18 Andreas Tobler <a.tobler@schweiz.org>
* config/rs6000/driver-rs6000.c (detect_caches_freebsd): New function.
......
......@@ -1771,6 +1771,18 @@ reassociate_bb (basic_block bb)
{
gsi_remove (&gsi, true);
release_defs (stmt);
/* We might end up removing the last stmt above which
places the iterator to the end of the sequence.
Reset it to the last stmt in this case which might
be the end of the sequence as well if we removed
the last statement of the sequence. In which case
we need to bail out. */
if (gsi_end_p (gsi))
{
gsi = gsi_last_bb (bb);
if (gsi_end_p (gsi))
break;
}
}
continue;
}
......
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