https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84272
--- Comment #16 from Richard Biener <rguenth at gcc dot gnu.org> --- Author: rguenth Date: Thu Mar 14 09:18:07 2019 New Revision: 269676 URL: https://gcc.gnu.org/viewcvs?rev=269676&root=gcc&view=rev Log: 2019-03-14 Richard Biener <rguent...@suse.de> Backport from mainline 2018-02-16 Jakub Jelinek <ja...@redhat.com> PR target/84272 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest): Use ++iter rather than iter++ for std::list iterators. (func_fma_steering::dfs): Likewise. Don't delete nodes right away, defer deleting them until all nodes in the forest are processed. Do free even leaf nodes. Change to_process into auto_vec. * g++.dg/opt/pr84272.C: New test. Added: branches/gcc-7-branch/gcc/testsuite/g++.dg/opt/pr84272.C Modified: branches/gcc-7-branch/gcc/ChangeLog branches/gcc-7-branch/gcc/config/aarch64/cortex-a57-fma-steering.c branches/gcc-7-branch/gcc/testsuite/ChangeLog