https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92357
--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> --- One possibility would be to make sure that for lto_stream_offload_p get_partitioning_class never returns SYMBOL_DUPLICATE, because for lto_stream_offload_p only ->offloadable nodes are selected for streaming. Honza, thoughts on that? Not really sure about the special cases like DECL_IN_CONTSTANT_POOL etc. Yet another option would be not stream only ->offloadable nodes, but also nodes for which node->get_partitioning_class () returns SYMBOL_DUPLICATE, that would be a solution closer to the OpenMP 5.0 way of automatic declare target to discovery, not fully, but partially. Honza, thoughts on that?