openmp: ensure variables in offload table are streamed out (PRs 94848 + 95551)
authorTobias Burnus <tobias@codesourcery.com>
Mon, 8 Jun 2020 21:24:57 +0000 (23:24 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Mon, 8 Jun 2020 21:24:57 +0000 (23:24 +0200)
commit1c0fdaf79e3618fd7512608a2e5c62b6b306e9e8
tree40801185b32a7952f90cf1d11b9e664ccf29eeff
parentffac9597256823612fb63bbab0f9ba3c11255e6b
openmp: ensure variables in offload table are streamed out (PRs 94848 + 95551)

gcc/ChangeLog:

PR lto/94848
PR middle-end/95551
* omp-offload.c (add_decls_addresses_to_decl_constructor,
omp_finish_file): Skip removed items.
* lto-cgraph.c (output_offload_tables): Likewise; set force_output
to this node for variables and functions.

libgomp/ChangeLog:

PR lto/94848
PR middle-end/95551
* testsuite/libgomp.fortran/target-var.f90: New test.
gcc/lto-cgraph.c
gcc/omp-offload.c
libgomp/testsuite/libgomp.fortran/target-var.f90 [new file with mode: 0644]