https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141
--- Comment #20 from ASA <aaron_sami_abassi at hotmail dot com> --- Update: This only seems to happen when the invocation occurs at different points from within the main function. To clarify, if one has a loop in main and only invokes the inline function from within the loop, it will still inline the call. This also seems to be true of lambda expressions. If the lambda is invoked from two different points inside main, it will not be expanded inline but if it is invoked only once from within a loop it will expand the code inline.