https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77938
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Status|UNCONFIRMED |NEW Last reconfirmed| |2016-10-11 Summary|missing tailcall |missing tailcall |optimization in case when |optimization in case when |local variable escapes |local variable escapes that | |goes out of scope before | |the possible tail call site Ever confirmed|0 |1 Severity|normal |enhancement --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed, GCC Is very conservative here. Basically any time a variable escapes, tail call is not used. This can be improved do to now GCC has a way to track if a variable is in scope at the call site.