mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-24 03:14:08 +08:00
9f9d128f45
OpenMP permits that a 'target device(ancestor:1)' is called without being enclosed in a target region - using the current device (i.e. the host) in that case. This commit adds a testcase for this. In case of nvptx, the missing on-device 'GOMP_target_ext' call causes that it and also the associated on-device GOMP_REV_OFFLOAD_VAR variable are not linked in from nvptx's libgomp.a. Thus, handle the failing cuModuleGetGlobal gracefully by disabling reverse offload and assuming that the failure is fine. libgomp/ChangeLog: * plugin/plugin-nvptx.c (GOMP_OFFLOAD_load_image): Use unsigned int for 'i' to match 'fn_entries'; regard absent GOMP_REV_OFFLOAD_VAR as valid and the code having no reverse-offload code. * testsuite/libgomp.c-c++-common/reverse-offload-2.c: New test. |
||
---|---|---|
.. | ||
config | ||
lib | ||
libgomp.c | ||
libgomp.c-c++-common | ||
libgomp.c++ | ||
libgomp.fortran | ||
libgomp.graphite | ||
libgomp.oacc-c | ||
libgomp.oacc-c-c++-common | ||
libgomp.oacc-c++ | ||
libgomp.oacc-fortran | ||
libgomp-site-extra.exp.in | ||
libgomp-test-support.exp.in | ||
Makefile.am | ||
Makefile.in |