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

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
As for the other ICE, I'm still lost, I don't see similar bug to the above in
other functions that write summaries.
In output_symtab I see that all cgraph_nodes are streamed out, just those that
fail lto_symtab_encoder_in_partition_p (i.e. the non-offloaded ones) will not
have the callees and summaries and various other stuff streamed.
lto_output_node sets boundary_p for the other partition nodes, and that
sometimes leads to in_other_partition being set.  Now that certainly isn't set
when such nodes are streamed in again and e.g. FOR_EACH_DEFINED_FUNCTION then
happily iterates over those in the offloading lto1.  Note, modifying some flags
on nodes during the offloading LTO streaming is dangerous, as if we also stream
normal LTO, where e.g. in_other_partition shouldn't be set when for offloading
LTO it should be, we could be in trouble.

Reply via email to