https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91299
--- Comment #12 from Eason Lai <sen2403 at hotmail dot com> --- Hope this information could help. I added "-fopt-info-inline-optimized-missed=inline.txt" in the CFLAGS to see what happens between -Os and -O1. Here is the output when using "-O1": missed: not inlinable: main/5 -> get_t/4, function not inline candidate Here is the output when using "-Os": main.c:13:9: missed: not inlinable: main/5 -> get_t/4, function body can be overwritten at link time optimized: Inlined get_t/4 into main/5 which now has time 3.000000 and size 4, net change of +0. It happens in ipa-inline.c::inline_small_functions when using "-O2" or above.