https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119718
--- Comment #17 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:2e3c91786a981f2d68600e2d7b2e25a766e59c21 commit r15-9454-g2e3c91786a981f2d68600e2d7b2e25a766e59c21 Author: Jakub Jelinek <ja...@redhat.com> Date: Mon Apr 14 19:31:23 2025 +0200 pretty-print, expand: Print [must tail call] for CALL_EXPRs and fix up maybe_complain_about_tail_call [PR119718] Andrew P. mentioned earlier he'd like to see in the dump files a note whether it was a failed must tail call or not. We already print that on the tailc/musttail pass side, because print_gimple_stmt prints [must tail call] after the musttail calls. The first hunk below does it for GENERIC CALL_EXPRs too (which is needed for the expand diagnostics). That isn't enough though, because the error on it was done first and then CALL_EXPR_MUST_TAIL_CALL flag was cleared, so the dump didn't have it anymore. I've reordered the dump printing with error, so that it works properly. 2025-04-14 Jakub Jelinek <ja...@redhat.com> PR tree-optimization/119718 * tree-pretty-print.cc (dump_generic_node) <case CALL_EXPR>: Dump also CALL_EXPR_MUST_TAIL_CALL flag. * calls.cc (maybe_complain_about_tail_call): Emit error about CALL_EXPR_MUST_TAIL_CALL only after emitting dump message, not before it.