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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Jakub Jelinek
<ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:c0dd240b1999e2fbeaa6106706bf25e74238bceb

commit r15-9957-gc0dd240b1999e2fbeaa6106706bf25e74238bceb
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Fri Jul 11 12:09:44 2025 +0200

    ipa: Disallow signature changes in fun->has_musttail functions [PR121023]

    As the following testcase shows e.g. on ia32, letting IPA opts change
    signature of functions which have [[{gnu,clang}::musttail]] calls
    can turn programs that would be compiled normally into something
    that is rejected because the caller has fewer argument stack slots
    than the function being tail called.

    The following patch prevents signature changes for such functions.
    It is perhaps too big hammer in some cases, but it might be hard
    to try to figure out what signature changes are still acceptable and which
    are not at IPA time.

    2025-07-11  Jakub Jelinek  <ja...@redhat.com>
                Martin Jambor  <mjam...@suse.cz>

            PR ipa/121023
            * ipa-fnsummary.cc (compute_fn_summary): Disallow signature changes
            on cfun->has_musttail functions.

            * c-c++-common/musttail32.c: New test.

    (cherry picked from commit 89b9372d61ccd45cb6c71518d62215917e3aaebc)

Reply via email to