https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91299
--- Comment #13 from Eason Lai <sen2403 at hotmail dot com> --- The inline rule in ipa-inline.c::inline_small_functions can be bypassed by adding "noinline" attribute as shown below. __attribute__((weak, noinline)) int get_t(void) { return 0; } It's an alternative solution for me.