https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67075
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Sounds more like ggc_collect is now always doing the gc and there are a lot of ggc_collect calls. So what is happening we are close to your 32M limit you set, so any garbage that is produced in a pass will cause the next call to ggc_collect to always collect. This means there a lot of calls to ggc_collect but in the normal case (non 0 case), it does not matter. You might want to try 5.2 as 4.8.x is no longer supported and there have been some memory reductions happened since 4.8.x.