https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83324

--- Comment #17 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andi Kleen <a...@gcc.gnu.org>:

https://gcc.gnu.org/g:81824596361cf4919d6dc026155160581c99b860

commit r15-2125-g81824596361cf4919d6dc026155160581c99b860
Author: Andi Kleen <a...@linux.intel.com>
Date:   Tue May 21 07:01:57 2024 -0700

    Give better error messages for musttail

    When musttail is set, make tree-tailcall give error messages
    when it cannot handle a call. This avoids vague "other reasons"
    error messages later at expand time when it sees a musttail
    function not marked tail call.

    In various cases this requires delaying the error until
    the call is discovered.

    Also print more information on the failure to the dump file.

    gcc/ChangeLog:

            PR c/83324
            * tree-tailcall.cc (maybe_error_musttail): New function.
            (suitable_for_tail_opt_p): Report error reason.
            (suitable_for_tail_call_opt_p): Report error reason.
            (find_tail_calls): Accept basic blocks with abnormal edges.
            Delay reporting of errors until the call is discovered.
            Move top level suitability checks to here.
            (tree_optimize_tail_calls_1): Remove top level checks.

Reply via email to