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

--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Martin Jambor
<[email protected]>:

https://gcc.gnu.org/g:8aa5af5736f6fe284d2b2454d786f90a16076c2d

commit r14-12321-g8aa5af5736f6fe284d2b2454d786f90a16076c2d
Author: Martin Jambor <[email protected]>
Date:   Wed Feb 18 13:53:34 2026 +0100

    ipa-cp: Fix assert triggering with -fno-toplevel-reorder (PR 106260)

    with -fno-toplevel-reorder (and -fwhole-program), there apparently can
    be local functions without any callers.  This is something that IPA-CP
    does not like because its propagation verifier checks that local
    functions do not end up with TOP in their lattices.  Therefore there
    is an assert checking that all call-less unreachable functions have
    been removed, which tigers in PR 106260 with these two options.

    This patch detects the situation and marks the lattices as variable,
    thus avoiding both the assert trigger and the verification failure.

    gcc/ChangeLog:

    2022-07-13  Martin Jambor  <[email protected]>

            PR ipa/106260
            * ipa-cp.cc (initialize_node_lattices): Replace assert that there
are
            callers with handling that situation when -fno-toplevel_reorder.

    gcc/testsuite/ChangeLog:

    2022-07-13  Martin Jambor  <[email protected]>

            PR ipa/106260
            * g++.dg/ipa/pr106260.C: New test.

Reply via email to