https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84272
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #43381|0 |1 is obsolete| | Attachment #43382|0 |1 is obsolete| | Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org --- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 43384 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43384&action=edit gcc8-pr84272.patch So like this? A few additional changes, Florian Weimer suggested using preincrement instead of postincrement with the C++ iterators, and I hope there are no pointers in between different forest, so it should be fine to free already when processing of the forest is done, rather than waiting until all forests are processed. Could somebody test it on aarch64-linux please?