https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117148
--- Comment #4 from LIU Hao <lh_mouse at 126 dot com> --- >From the code we can see that the call is unconditional; it must happen, so is not 'unlikely'. On the other hand, `atomic_cmpxchg_iptr` is more complex but surprisingly it is able to be inlined. And yes, changing that function to `static` also solves the issue.