https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56727
--- Comment #12 from Yuri Gribov <tetra2005 at gmail dot com> --- (In reply to Jakub Jelinek from comment #10) > (In reply to Yuri Gribov from comment #9) > > (In reply to Alexander Monakov from comment #8) > > > Well, if my argument is correct, then GCC generates wrong code for the > > > very > > > first example in comment #0. > > > > I believe it does (see my #5, most probly author of some pass failed to > > check for interposition). Note that simple recursive factorial is expanded > > to loop too which is a more impressive instance of this bug. > > > > > To my knowledge, that > > > is the sole instance where optimization doesn't fully honor ELF > > > interposition possibility. > > > > +1 > > Don't we also inline any beneficial inline functions at -O3 even if they > could be interposed (definitely not suggesting we stop doing that, that > would totally kill compiler performance)? Inlining inline functions is fine due to ODR rule.