https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10837
--- Comment #34 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Lukas Grätz from comment #33) > (In reply to Jakub Jelinek from comment #32) > > gnu::musttail instead of musttail. > > Still doesn't work, but I guess it is the same problem as in PR 121642. > > > #include <stdlib.h> > > [[gnu::always_inline]] inline void tail_to_abort(void) > { > [[gnu::musttail]] return abort(); > } > > #define abort() tail_to_abort() > > void temp() > { > abort(); > } Musttail attribute needs to be used on the caller side of even the inline function. The design choice is that both inlining and tail call remove one frame from the call stack, so when a non-musttail called function is inlined, its musttail attributes are ignored (one level has been removed), similarly if a musttail called function is inlined and it doesn't contain musttail attributes on its return calls. Only if both the caller and callee have musttail attributes (i.e. user is asking to remove 2 frames from the call stack), then when the function is inlined the musttail is kept. So the #c31 suggestion is bogus, you really need a macro like #define tail_call_abort() [[gnu::musttail]] return abort () (and it will only work in functions which return void).