This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/56727] Recursive call goes through the PLT unnecessarily
- From: "tetra2005 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 09 Feb 2017 15:48:47 +0000
- Subject: [Bug middle-end/56727] Recursive call goes through the PLT unnecessarily
- Auto-submitted: auto-generated
- References: <bug-56727-4@http.gcc.gnu.org/bugzilla/>
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.