https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82476
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |RESOLVED Resolution|--- |INVALID --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Yep. The heuristics here is that since it is only called once from main (which makes it unlikely) and it is exported not to inline the function. From the output of the debug dumps: not inlinable: int main()/25 -> result_type get_result()/21, call is unlikely and code size would grow