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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Josef Melcr <[email protected]>:

https://gcc.gnu.org/g:0183d3736acc311cf489d66e42a3bd84cab261d3

commit r17-6310-g0183d3736acc311cf489d66e42a3bd84cab261d3
Author: Josef Melcr <[email protected]>
Date:   Mon Nov 16 13:03:56 2026 +0100

    ipa: Fix modified initialization in build_new_function_type [PR128602]

    This patch changes the initialization of modified to better handle cases
    when m_adj_params is NULL.  That case could mean that either the
    function had parameters and they were all removed (and thus modified
    should be TRUE), or that the function had no parameters to begin with
    (and modified should be FALSE).  If the flag is set incorrectly, some
    attributes may not be dropped when they were supposed to, leading to
    issues such as in PR128602.  The new initialization takes both cases
    into account.

            PR ipa/128602

    gcc/ChangeLog:

            * ipa-param-manipulation.cc
            (ipa_param_adjustments::build_new_function_type): Fix
initialization
            of modified.

    gcc/testsuite/ChangeLog:

            * gcc.dg/ipa/pr128602.c: New test.

    Signed-off-by: Josef Melcr <[email protected]>

Reply via email to