https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114262
--- Comment #7 from LIU Hao <lh_mouse at 126 dot com> --- (In reply to Jan Hubicka from comment #6) > > Note GCC has not retuned its -Os heurstics for a long time because it has > > been > > decent enough for most folks and corner cases like this is almost never come > > up. > There were quite few changes to -Os heuristics :) > One of bigger challenges is that we do see more and more C++ code built > with -Os which relies on certain functions to be inlined and optimized > in context, so we had to get more optimistic in a hope that inlined code > will optimize well. > > COMDAT functions are more likely inlined because statistics shows that > many of them are not really shared between translations units > (see -param=comdat-sharing-probability parameter). This was necessary to > get reasonable code for Firefox approx 15 years ago. So is there no way to get the C99 extern inline behavior? i.e. sibling calls to gnu_inline functions are inlined even when optimizing for size.