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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Jambor <jamb...@gcc.gnu.org>:

https://gcc.gnu.org/g:1a7d452c092be42a892d00c19561af10f42410b0

commit r12-4230-g1a7d452c092be42a892d00c19561af10f42410b0
Author: Martin Jambor <mjam...@suse.cz>
Date:   Thu Oct 7 16:21:19 2021 +0200

    ipa: Fix ICE when speculating calls from inlined functions (PR 102388)

    The code handling various cases which lead to call graph edge
    duplication (in order to update reference descriptions used to track
    and remove no-longer needed references) has missed one important case.

    When edge duplication is an effect of creating a speculative edge for
    an indirect edge which carries a constant jump function which had been
    created from a pass-through function when the edge caller has was
    inlined into one of its callers, the reference description attached to
    the function describes an edge higher up in the "inlined" clone tree
    and so even the new speculative edge will.  Therefore we should not
    try to duplicate the reference description itself but rather just bump
    the refcount of the existing one.

    gcc/ChangeLog:

    2021-09-22  Martin Jambor  <mjam...@suse.cz>

            PR ipa/102388
            * ipa-prop.c (ipa_edge_args_sum_t::duplicate): Also handle the
            case when the source reference description corresponds to a
            referance taken in a function src->caller is inlined to.

Reply via email to