https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120608
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Another testcase: void foo (int *, int *, int *); void bar (int *, int *, int *); void baz (int *, int *, int *) { int a = 42, b = -42, c = 0; foo (&a, &b, &c); [[gnu::musttail]] return bar (&a, &b, &c); } The reason is that we set disable_tailcalls when expanding blocks when there is epilogue cleanup sequence emitted by asan_emit_stack_protection. Wonder if clang emits such sequence before the musttail calls instead or what, will need to investigate. Or maybe doesn't diagnose use after free in functions calling musttail calls?