https://gcc.gnu.org/g:e68a58a119da54a1039f42a0749a637536974a1c
commit r17-5502-ge68a58a119da54a1039f42a0749a637536974a1c Author: Kees Cook <[email protected]> Date: Thu Oct 15 12:45:18 2026 -0700 ipa-icf: Step to the next caller past a thunk in redirect_all_callers redirect_all_callers walks the callers of N, but steps past a thunk caller with next_callee, the next call the thunk makes. A thunk makes only that one call, so the walk ends there, and so the callers after the thunk in the list would not be redirected. This came with the thunk check in commit 17d1bf760f8 ("re PR target/65263"). gcc/ChangeLog: * ipa-icf.cc (redirect_all_callers): Step to the next caller, not the next callee, past a thunk. Signed-off-by: Kees Cook <[email protected]> Diff: --- gcc/ipa-icf.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ipa-icf.cc b/gcc/ipa-icf.cc index 64cc722bd7aa..7b524bdf16b1 100644 --- a/gcc/ipa-icf.cc +++ b/gcc/ipa-icf.cc @@ -995,7 +995,7 @@ redirect_all_callers (cgraph_node *n, cgraph_node *to) nredirected++; } else - e = e->next_callee; + e = e->next_caller; } for (unsigned i = 0; n->iterate_direct_aliases (i, ref);) {
