On Thu, Dec 04, 2014 at 10:35:19PM +0300, Ilya Verbin wrote: > This issue can be resolved by forcing output of such variables. > Is this fix ok? Should I add a testcase?
Yes, with proper ChangeLog. Yes. > diff --git a/gcc/varpool.c b/gcc/varpool.c > index 0526b7f..db28c2a 100644 > --- a/gcc/varpool.c > +++ b/gcc/varpool.c > @@ -175,6 +175,7 @@ varpool_node::get_create (tree decl) > g->have_offload = true; > if (!in_lto_p) > vec_safe_push (offload_vars, decl); > + node->force_output = 1; > #endif > } Jakub