https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119718
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 61071 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61071&action=edit gcc15-pr119718.patch Untested patch which changes the -fdump-tree-tailc message wording and moves it to just -fdump-tree-tailc-details, and adds similar messages to -fdump-rtl-expand-details. Can be tested on say: int foo (int, int, int, int, int, int, int); int bar (int); void qux (int *); int baz (int x) { if (x) return foo (1, 2, 3, 4, 5, 6, 7); else { int y; qux (&y); return bar (x); } } ./xgcc -B ./ -S -O2 -fdump-{tree-tailc,rtl-expand}-details pr119718.c ; grep -B1 '^\(;; \)\?Cannot tail-call:' pr119718.c.* pr119718.c.222t.tailc-_7 = bar (0); pr119718.c.222t.tailc:Cannot tail-call: call invocation refers to locals -- pr119718.c.270r.expand-;; foo (1, 2, 3, 4, 5, 6, 7) [tail call] pr119718.c.270r.expand:;; Cannot tail-call: callee required more stack slots than the caller