https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63892
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 34815 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34815&action=edit gcc5-pr63892.patch This untested patch fixes the issue too, though if the #c4 patch could be made to work, it might be perhaps unnecessary because we would never try to add thunks in between local functions. Or is there any case where it would make sense to add them rather than redirect callers?