On Tue, Mar 24, 2020 at 02:16:40PM +0100, Tobias Burnus wrote:
> For nvptx, targetm_common.have_named_sections, hence one is

You mean targetm_common.have_named_sections is false, right?

> in the else branch of omp_finish_file – and the else branch
> did not handle target-link variables.
> 
> With this patch, the libgomp.c/target-link-1.c testcase now works.
> 
> When looking at the nvptx "assembler", I saw that TREE_PUBLIC was
> set for 'b' (the 'omp declare target to'-variable) but not the
> target-link variables. (Not relevant for the failing test case.)
> 
> OK for the trunk?

Ok, thanks.

> Fix OpenMP offload handling for target-link variables for nvptx (PR81689)
> 
>       PR libgomp/81689
>       * lto.c (offload_handle_link_vars): Propagate TREE_PUBLIC state.
> 
>       PR libgomp/81689
>       * omp-offload.c (omp_finish_file): Fix target-link handling if
>       targetm_common.have_named_sections is false.
> 
>       PR libgomp/81689
>       * testsuite/libgomp.c/target-link-1.c: Remove xfail.

        Jakub

Reply via email to