https://gcc.gnu.org/g:19024b653d74af36b7743780fdafd92c1dce5f65
commit r17-3808-g19024b653d74af36b7743780fdafd92c1dce5f65 Author: Kugan Vivekanandarajah <[email protected]> Date: Tue Sep 1 19:52:09 2026 +1000 [AutoFDO] Avoid inserting null PHI profile matches Compiling SPEC CPU 2026 710.omnetpp_r with an AutoFDO profile failed with: during IPA pass: afdo_offline internal compiler error: in add, at hash-set.h:64 PHI nodes have no source location, and lookup_count is required to return null for them. Do not insert that null pointer into the set of matched profile entriesi. gcc/ChangeLog: * auto-profile.cc (function_instance::match): Do not insert a null entry into counts. Diff: --- gcc/auto-profile.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/gcc/auto-profile.cc b/gcc/auto-profile.cc index 643e0622df5b..9b9ab5f4d9ae 100644 --- a/gcc/auto-profile.cc +++ b/gcc/auto-profile.cc @@ -1763,7 +1763,6 @@ function_instance::match (cgraph_node *node, count_info *info = lookup_count (gimple_location (phi), stack, node); gcc_assert (!info); dump_stmt (phi, info, NULL, stack); - counts.add (info); /* PHI arguments are indexed by incoming (predecessor) edges. */ for (edge e : bb->preds) {
