Move an use-after-free access before the delete.

gcc/
	PR target/80671
	* config/aarch64/cortex-a57-fma-steering.c (merge_forest):
	Move member access before delete.

From-SVN: r247831
This commit is contained in:
Wilco Dijkstra 2017-05-10 11:01:26 +00:00 committed by Wilco Dijkstra
parent e1ad2926a0
commit 33e2d6f8ba
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2017-05-10 Wilco Dijkstra <wdijkstr@arm.com>
PR target/80671
* config/aarch64/cortex-a57-fma-steering.c (merge_forest):
Move member access before delete.
2017-05-10 Alexandre Oliva <aoliva@redhat.com>
* tree-inline.c (expand_call_inline): Split block at stmt

View File

@ -411,9 +411,9 @@ fma_forest::merge_forest (fma_forest *other_forest)
the list of tree roots of ref_forest. */
this->m_globals->remove_forest (other_forest);
this->m_roots->splice (this->m_roots->begin (), *other_roots);
delete other_forest;
this->m_nb_nodes += other_forest->m_nb_nodes;
delete other_forest;
}
/* Dump information about the forest FOREST. */