https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94320
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Perhaps related to PR92357? I'm stuck there, tried 2020-02-07 Jakub Jelinek <ja...@redhat.com> PR ipa/92357 * symtab.c (symtab_node::get_partitioning_class): Don't return SYMBOL_DUPLICATE for DECL_ONE_ONLY symbols if lto_stream_offload_p. --- gcc/symtab.c.jj 2020-01-15 11:05:19.589136168 +0100 +++ gcc/symtab.c 2020-02-07 19:57:55.625108414 +0100 @@ -2003,6 +2003,7 @@ symtab_node::get_partitioning_class (voi if (DECL_ONE_ONLY (decl) && !force_output && !forced_by_abi + && !lto_stream_offload_p && !used_from_object_file_p ()) return SYMBOL_DUPLICATE; but it didn't work out. I'm afraid we need to actually implement properly the OpenMP 5.0 automatic omp declare target discovery and before IPA run perhaps another iteration of that and make sure that if we offload something, we either offload everything it refers to too (unless DECL_EXTERNAL), or diagnose it.