https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121159
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Ah, in PR119483 I've only handled the case where the function is not declared [[noreturn]] but is implicitly turned into [[noreturn]] because it is determined to never return. We need another one liner to make explicit [[noreturn]] to work. [[gnu::noinline, gnu::noclone]] int foo (void) { asm volatile ("" : : : "memory"); for (;;) ; return 42; } int bar (void) { [[gnu::musttail]] return foo (); } [[noreturn, gnu::noipa]] void baz (void) { for (;;) ; } void qux (void) { [[gnu::musttail]] return baz (); }