https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119493
--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Another thing I've just noticed: [[gnu::noipa]] int bar (int x, int y) { return x + y; } [[gnu::noinline, gnu::noclone]] int foo (int x, int y) { if (x < 10) [[gnu::musttail]] return bar (x, y); if (y & 2) return foo (x - 1, y) * 2; if (y & 1) [[gnu::musttail]] return foo (x - 1, y); return foo (x - 1, y) * 3; } at -O2 fails, because we decide to do multiplication tail recursion and that adds statements after all calls. We need to avoid such tail recursion if there are musttail calls which can't be tail recursion optimized.