https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115201
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Created attachment 58273 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58273&action=edit Better (reduced testcase) The tail call happens in the foo2 case while not in foo1. This is due to struct returns are not always handled for tail call ..