gcc/libgomp/testsuite
Tobias Burnus 9f9d128f45 libgomp: Add no-target-region rev offload test + fix plugin-nvptx
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.
2022-11-25 13:48:17 +01:00
..
config Update copyright years. 2022-01-03 10:42:10 +01:00
lib Remove support for Intel MIC offloading 2022-11-04 10:51:01 +01:00
libgomp.c Fix nvptx-specific '-foffload-options' syntax in 'libgomp.c/reverse-offload-sm30.c' 2022-10-17 13:50:57 +02:00
libgomp.c-c++-common libgomp: Add no-target-region rev offload test + fix plugin-nvptx 2022-11-25 13:48:17 +01:00
libgomp.c++ OpenMP, C++: Add template support for the has_device_addr clause. 2022-05-16 01:02:50 -07:00
libgomp.fortran Remove support for Intel MIC offloading 2022-11-04 10:51:01 +01:00
libgomp.graphite Update copyright years. 2022-01-03 10:42:10 +01:00
libgomp.oacc-c [testsuite] Unset 'offload_target' after use 2020-07-24 14:00:43 +02:00
libgomp.oacc-c-c++-common Restore 'libgomp.oacc-c-c++-common/nvptx-sese-1.c' SESE regions checking [PR107195, PR107344] 2022-10-21 11:27:27 +02:00
libgomp.oacc-c++ OpenMP/OpenACC struct sibling list gimplification extension and rework 2022-09-14 13:59:55 +00:00
libgomp.oacc-fortran Support OpenACC 'declare create' with Fortran allocatable arrays, part II [PR106643, PR96668] 2022-11-02 20:51:41 +01:00
libgomp-site-extra.exp.in libgomp/test: Remove a build sysroot fix regression 2020-04-06 23:32:45 +01:00
libgomp-test-support.exp.in libgomp nvptx plugin: Remove '--with-cuda-driver=[...]' etc. configuration option 2022-06-10 17:08:57 +02:00
Makefile.am libgomp/test: Remove a build sysroot fix regression 2020-04-06 23:32:45 +01:00
Makefile.in libgomp nvptx plugin: Remove '--with-cuda-driver=[...]' etc. configuration option 2022-06-10 17:08:57 +02:00