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

--- Comment #8 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:3bbe1a86ccecb180a4d32de6eab97bcc624a410f

commit r17-2351-g3bbe1a86ccecb180a4d32de6eab97bcc624a410f
Author: Josef Melcr <[email protected]>
Date:   Tue Jun 23 17:46:08 2026 +0200

    ipa: Add missing call to duplication hooks [PR ipa/125121]

    This patch adds a missing call to edge duplication hooks in
    cgraph_edge::make_callback.

    In PR125121, we get an ICE in ipa-sra when compiling with -fno-ipa-cp,
    because the analysis in ipa-prop runs after sra generates its summaries.
    Because of the missing call to the hooks, the summaries required by sra
    don't get copied over for the newly added callback edges, leading to
    segfaults.  This patch adds the call to the hooks to remedy this.  It
    also changes some of the initialization logic for summaries for callback
    edges to make it a little more consistent.

            PR ipa/125121

    gcc/ChangeLog:

            * cgraph.cc (cgraph_edge::make_callback): Add missing call to
            duplication hooks.
            * ipa-prop.cc (init_callback_edge_summary): Remove function.
            (ipa_compute_jump_functions_for_edge): Remove call to
            init_callback_edge_summary, fix comment.
            (ipa_edge_args_sum_t::duplicate): Fix the initialization of jump
            functions vector for callback edges.

    gcc/testsuite/ChangeLog:

            * c-c++-common/gomp/pr125121.c: New test.

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

Reply via email to