https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122603
--- Comment #4 from Sam James <sjames at gcc dot gnu.org> ---
In join_partitions, we check for validity:
static ltrans_partition
join_partitions (ltrans_partition into, ltrans_partition from)
{
...
for (lsei = lsei_start (encoder); !lsei_end_p (lsei); lsei_next (&lsei))
{
toplevel_node *node = lsei_node (lsei);
if (symtab_node *snode = dyn_cast <symtab_node*> (node))
...
But we don't in split_partition_into_nodes:
for (lsei = lsei_start (encoder); !lsei_end_p (lsei); lsei_next (&lsei))
{
toplevel_node *node = lsei_node (lsei);
symtab_node *snode = dyn_cast <symtab_node*> (node);
if (snode->get_partitioning_class () != SYMBOL_PARTITION
|| symbol_partitioned_p (snode))
continue;
...
The two functions iterate over a partition in the same way so I guess a check
may make sense there, but I don't know why we have a null (s)node to begin
with.