ipa-inline.c (inline_small_functions): Move assignment to next before call destroying edge.

2019-11-15  Richard Biener  <rguenther@suse.de>

	* ipa-inline.c (inline_small_functions): Move assignment
	to next before call destroying edge.

From-SVN: r278282
This commit is contained in:
Richard Biener 2019-11-15 09:38:03 +00:00 committed by Richard Biener
parent f0af4848ac
commit 2e98ac8676
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2019-11-15 Richard Biener <rguenther@suse.de>
* ipa-inline.c (inline_small_functions): Move assignment
to next before call destroying edge.
2019-11-15 Richard Biener <rguenther@suse.de>
PR tree-optimization/92039

View file

@ -1932,13 +1932,13 @@ inline_small_functions (void)
if (has_speculative)
for (edge = node->callees; edge; edge = next)
{
next = edge->next_callee;
if (edge->speculative
&& !speculation_useful_p (edge, edge->aux != NULL))
{
edge->resolve_speculation ();
update = true;
}
next = edge->next_callee;
}
if (update)
{