https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67435
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Gcc also tries to limit code growth for the unit also which might be something you are seeing. You can also try -Winline. Also -flto is becoming more prevalent and more popular. So you might want to give that a try also with 4.9 and above.