https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121642

--- Comment #2 from Drea Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andi Kleen from comment #1)
> I don't understand the test case. g and g1 seem to be identical, and nothing
> is inlined anywhere?

Yes they are identical and that is the point. ICF happens and g1 becomes an
alias to g but since g and g1 are external they need to be seperate functions.
So we change g1 to be just a call to g. And then inliner comes alongs and
inlines g into g1 and the musttail is gone.

That is look at the generated code for g1 at -O2, you will see g1 does not have
a tail call to h.

Reply via email to