https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80411
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu.org --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- So, do we want to force output of everything we reference from the offload tables, like untested: --- gcc/omp-offload.c.jj 2017-03-29 07:11:21.000000000 +0200 +++ gcc/omp-offload.c 2017-04-18 14:08:25.154650257 +0200 @@ -152,6 +152,11 @@ add_decls_addresses_to_decl_constructor CONSTRUCTOR_APPEND_ELT (v_ctor, NULL_TREE, addr); if (is_var) CONSTRUCTOR_APPEND_ELT (v_ctor, NULL_TREE, size); + + if (is_var) + varpool_node::get (it)->force_output = 1; + else + cgraph_node::get (it)->mark_force_output (); } } ? Note I have no idea why the cgraph/symtab code doesn't see those table ctors and figure this out from those.