[Bug ipa/106260] [13/14 Regression] ICE in initialize_node_lattices, at ipa-cp.cc:1289 since r8-1887-g0eaf0bfe94ff5a7c
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Mar 4 12:18:38 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106260
--- Comment #12 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Martin Jambor
<jamborm@gcc.gnu.org>:
https://gcc.gnu.org/g:ae7d1af4fd722ce2b5b5104a3b448e4f6a9ef43c
commit r13-10112-gae7d1af4fd722ce2b5b5104a3b448e4f6a9ef43c
Author: Martin Jambor <mjambor@suse.cz>
Date: Fri Feb 6 22:49:43 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 <mjambor@suse.cz>
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 <mjambor@suse.cz>
PR ipa/106260
* g++.dg/ipa/pr106260.C: New test.
(cherry picked from commit f7e335aa007f32a003dde88a7500e326b1dcef65)
More information about the Gcc-bugs
mailing list