aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog27
-rw-r--r--libgomp/testsuite/lib/libgomp.exp1
-rw-r--r--libgomp/testsuite/libgomp.c/interop-cuda-full.c3
-rw-r--r--libgomp/testsuite/libgomp.c/interop-cuda-libonly.c3
-rw-r--r--libgomp/testsuite/libgomp.c/interop-hip-amd-full.c3
-rw-r--r--libgomp/testsuite/libgomp.c/interop-hip-amd-no-hip-header.c3
-rw-r--r--libgomp/testsuite/libgomp.c/interop-hip-nvidia-full.c3
-rw-r--r--libgomp/testsuite/libgomp.c/interop-hip-nvidia-no-headers.c3
-rw-r--r--libgomp/testsuite/libgomp.c/interop-hip-nvidia-no-hip-header.c3
-rw-r--r--libgomp/testsuite/libgomp.fortran/interop-hip-amd-full.F903
-rw-r--r--libgomp/testsuite/libgomp.fortran/interop-hip-amd-no-module.F903
-rw-r--r--libgomp/testsuite/libgomp.fortran/interop-hip-nvidia-full.F903
-rw-r--r--libgomp/testsuite/libgomp.fortran/interop-hip-nvidia-no-module.F903
-rw-r--r--libgomp/testsuite/libgomp.fortran/map-alloc-comp-9-usm.f9011
-rw-r--r--libgomp/testsuite/libgomp.fortran/map-alloc-comp-9.f9019
15 files changed, 91 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index b4032bc..fa2ddae 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,30 @@
+2025-05-09 Tobias Burnus <tburnus@baylibre.com>
+
+ * testsuite/libgomp.c/interop-cuda-full.c: Use 'link' instead
+ of 'run' when the default device is "! offload_device_nvptx".
+ * testsuite/libgomp.c/interop-cuda-libonly.c: Likewise.
+ * testsuite/libgomp.c/interop-hip-nvidia-full.c: Likewise.
+ * testsuite/libgomp.c/interop-hip-nvidia-no-headers.c: Likewise.
+ * testsuite/libgomp.c/interop-hip-nvidia-no-hip-header.c: Likewise.
+ * testsuite/libgomp.fortran/interop-hip-nvidia-full.F90: Likewise.
+ * testsuite/libgomp.fortran/interop-hip-nvidia-no-module.F90: Likewise.
+ * testsuite/libgomp.c/interop-hip-amd-full.c: Use 'link' instead
+ of 'run' when the default device is "! offload_device_gcn".
+ * testsuite/libgomp.c/interop-hip-amd-no-hip-header.c: Likewise.
+ * testsuite/libgomp.fortran/interop-hip-amd-full.F90: Likewise.
+ * testsuite/libgomp.fortran/interop-hip-amd-no-module.F90: Likewise.
+
+2025-05-09 David Malcolm <dmalcolm@redhat.com>
+
+ PR other/116792
+ * testsuite/lib/libgomp.exp: Add load_lib of scanhtml.exp.
+
+2025-05-07 Tobias Burnus <tburnus@baylibre.com>
+
+ * testsuite/libgomp.fortran/map-alloc-comp-9.f90: Process differently
+ when USE_USM_REQUIREMENT is set.
+ * testsuite/libgomp.fortran/map-alloc-comp-9-usm.f90: New test.
+
2025-05-06 Tejas Belagod <tejas.belagod@arm.com>
* testsuite/libgomp.c-target/aarch64/udr-sve.c: Fix test.
diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp
index 54f2f708..fd475ac 100644
--- a/libgomp/testsuite/lib/libgomp.exp
+++ b/libgomp/testsuite/lib/libgomp.exp
@@ -30,6 +30,7 @@ load_gcc_lib scandump.exp
load_gcc_lib scanlang.exp
load_gcc_lib scanrtl.exp
load_gcc_lib scansarif.exp
+load_gcc_lib scanhtml.exp
load_gcc_lib scantree.exp
load_gcc_lib scanltrans.exp
load_gcc_lib scanoffload.exp
diff --git a/libgomp/testsuite/libgomp.c/interop-cuda-full.c b/libgomp/testsuite/libgomp.c/interop-cuda-full.c
index 38aa6b1..c48a934 100644
--- a/libgomp/testsuite/libgomp.c/interop-cuda-full.c
+++ b/libgomp/testsuite/libgomp.c/interop-cuda-full.c
@@ -1,3 +1,6 @@
+/* { dg-do run { target { offload_device_nvptx } } } */
+/* { dg-do link { target { ! offload_device_nvptx } } } */
+
/* { dg-require-effective-target openacc_cuda } */
/* { dg-require-effective-target openacc_cudart } */
/* { dg-additional-options "-lcuda -lcudart" } */
diff --git a/libgomp/testsuite/libgomp.c/interop-cuda-libonly.c b/libgomp/testsuite/libgomp.c/interop-cuda-libonly.c
index 17cbb15..bc257a2 100644
--- a/libgomp/testsuite/libgomp.c/interop-cuda-libonly.c
+++ b/libgomp/testsuite/libgomp.c/interop-cuda-libonly.c
@@ -1,3 +1,6 @@
+/* { dg-do run { target { offload_device_nvptx } } } */
+/* { dg-do link { target { ! offload_device_nvptx } } } */
+
/* { dg-require-effective-target openacc_libcudart } */
/* { dg-require-effective-target openacc_libcuda } */
/* { dg-additional-options "-lcuda -lcudart" } */
diff --git a/libgomp/testsuite/libgomp.c/interop-hip-amd-full.c b/libgomp/testsuite/libgomp.c/interop-hip-amd-full.c
index d7725fc..bd44f44 100644
--- a/libgomp/testsuite/libgomp.c/interop-hip-amd-full.c
+++ b/libgomp/testsuite/libgomp.c/interop-hip-amd-full.c
@@ -1,3 +1,6 @@
+/* { dg-do run { target { offload_device_gcn } } } */
+/* { dg-do link { target { ! offload_device_gcn } } } */
+
/* { dg-require-effective-target gomp_hip_header_amd } */
/* { dg-require-effective-target gomp_libamdhip64 } */
/* { dg-additional-options "-lamdhip64" } */
diff --git a/libgomp/testsuite/libgomp.c/interop-hip-amd-no-hip-header.c b/libgomp/testsuite/libgomp.c/interop-hip-amd-no-hip-header.c
index 2584537..91ad987 100644
--- a/libgomp/testsuite/libgomp.c/interop-hip-amd-no-hip-header.c
+++ b/libgomp/testsuite/libgomp.c/interop-hip-amd-no-hip-header.c
@@ -1,3 +1,6 @@
+/* { dg-do run { target { offload_device_gcn } } } */
+/* { dg-do link { target { ! offload_device_gcn } } } */
+
/* { dg-require-effective-target gomp_libamdhip64 } */
/* { dg-additional-options "-lamdhip64" } */
diff --git a/libgomp/testsuite/libgomp.c/interop-hip-nvidia-full.c b/libgomp/testsuite/libgomp.c/interop-hip-nvidia-full.c
index 79af47d..d5dc236 100644
--- a/libgomp/testsuite/libgomp.c/interop-hip-nvidia-full.c
+++ b/libgomp/testsuite/libgomp.c/interop-hip-nvidia-full.c
@@ -1,3 +1,6 @@
+/* { dg-do run { target { offload_device_nvptx } } } */
+/* { dg-do link { target { ! offload_device_nvptx } } } */
+
/* { dg-require-effective-target openacc_cudart } */
/* { dg-require-effective-target openacc_cuda } */
/* { dg-require-effective-target gomp_hip_header_nvidia } */
diff --git a/libgomp/testsuite/libgomp.c/interop-hip-nvidia-no-headers.c b/libgomp/testsuite/libgomp.c/interop-hip-nvidia-no-headers.c
index 4586398..7cff2cb 100644
--- a/libgomp/testsuite/libgomp.c/interop-hip-nvidia-no-headers.c
+++ b/libgomp/testsuite/libgomp.c/interop-hip-nvidia-no-headers.c
@@ -1,3 +1,6 @@
+/* { dg-do run { target { offload_device_nvptx } } } */
+/* { dg-do link { target { ! offload_device_nvptx } } } */
+
/* { dg-require-effective-target openacc_libcudart } */
/* { dg-require-effective-target openacc_libcuda } */
/* { dg-additional-options "-lcuda -lcudart" } */
diff --git a/libgomp/testsuite/libgomp.c/interop-hip-nvidia-no-hip-header.c b/libgomp/testsuite/libgomp.c/interop-hip-nvidia-no-hip-header.c
index 4186984..7b7dc74 100644
--- a/libgomp/testsuite/libgomp.c/interop-hip-nvidia-no-hip-header.c
+++ b/libgomp/testsuite/libgomp.c/interop-hip-nvidia-no-hip-header.c
@@ -1,3 +1,6 @@
+/* { dg-do run { target { offload_device_nvptx } } } */
+/* { dg-do link { target { ! offload_device_nvptx } } } */
+
/* { dg-require-effective-target openacc_cudart } */
/* { dg-require-effective-target openacc_cuda } */
/* { dg-additional-options "-lcuda -lcudart" } */
diff --git a/libgomp/testsuite/libgomp.fortran/interop-hip-amd-full.F90 b/libgomp/testsuite/libgomp.fortran/interop-hip-amd-full.F90
index bbd49dd..eb2f437 100644
--- a/libgomp/testsuite/libgomp.fortran/interop-hip-amd-full.F90
+++ b/libgomp/testsuite/libgomp.fortran/interop-hip-amd-full.F90
@@ -1,3 +1,6 @@
+! { dg-do run { target { offload_device_gcn } } }
+! { dg-do link { target { ! offload_device_gcn } } }
+
! { dg-require-effective-target gomp_hipfort_module }
! { dg-require-effective-target gomp_libamdhip64 }
! { dg-additional-options "-lamdhip64" }
diff --git a/libgomp/testsuite/libgomp.fortran/interop-hip-amd-no-module.F90 b/libgomp/testsuite/libgomp.fortran/interop-hip-amd-no-module.F90
index 0afec83..0ebbe80 100644
--- a/libgomp/testsuite/libgomp.fortran/interop-hip-amd-no-module.F90
+++ b/libgomp/testsuite/libgomp.fortran/interop-hip-amd-no-module.F90
@@ -1,3 +1,6 @@
+! { dg-do run { target { offload_device_gcn } } }
+! { dg-do link { target { ! offload_device_gcn } } }
+
! { dg-require-effective-target gomp_libamdhip64 }
! { dg-additional-options "-lamdhip64" }
diff --git a/libgomp/testsuite/libgomp.fortran/interop-hip-nvidia-full.F90 b/libgomp/testsuite/libgomp.fortran/interop-hip-nvidia-full.F90
index cef592f..d29a689 100644
--- a/libgomp/testsuite/libgomp.fortran/interop-hip-nvidia-full.F90
+++ b/libgomp/testsuite/libgomp.fortran/interop-hip-nvidia-full.F90
@@ -1,3 +1,6 @@
+! { dg-do run { target { offload_device_nvptx } } }
+! { dg-do link { target { ! offload_device_nvptx } } }
+
! { dg-require-effective-target gomp_hipfort_module }
! { dg-require-effective-target openacc_cudart }
! { dg-require-effective-target openacc_cuda }
diff --git a/libgomp/testsuite/libgomp.fortran/interop-hip-nvidia-no-module.F90 b/libgomp/testsuite/libgomp.fortran/interop-hip-nvidia-no-module.F90
index c1ef29d..2063610 100644
--- a/libgomp/testsuite/libgomp.fortran/interop-hip-nvidia-no-module.F90
+++ b/libgomp/testsuite/libgomp.fortran/interop-hip-nvidia-no-module.F90
@@ -1,3 +1,6 @@
+! { dg-do run { target { offload_device_nvptx } } }
+! { dg-do link { target { ! offload_device_nvptx } } }
+
! { dg-require-effective-target openacc_libcudart }
! { dg-require-effective-target openacc_libcuda }
! { dg-additional-options "-lcuda -lcudart" }
diff --git a/libgomp/testsuite/libgomp.fortran/map-alloc-comp-9-usm.f90 b/libgomp/testsuite/libgomp.fortran/map-alloc-comp-9-usm.f90
new file mode 100644
index 0000000..90378c0
--- /dev/null
+++ b/libgomp/testsuite/libgomp.fortran/map-alloc-comp-9-usm.f90
@@ -0,0 +1,11 @@
+! { dg-additional-options "-cpp -DUSE_USM_REQUIREMENT=1 -Wno-openmp" }
+!
+! We silence the warning:
+! Mapping of polymorphic list item '...' is unspecified behavior [-Wopenmp]
+!
+! Ensure that polymorphic mapping is diagnosed as undefined behavior
+! Ensure that static access to polymorphic variables works
+
+! Run map-alloc-comp-9.f90 in unified-shared-memory mode
+
+#include "map-alloc-comp-9.f90"
diff --git a/libgomp/testsuite/libgomp.fortran/map-alloc-comp-9.f90 b/libgomp/testsuite/libgomp.fortran/map-alloc-comp-9.f90
index 3cec392..26c73d7 100644
--- a/libgomp/testsuite/libgomp.fortran/map-alloc-comp-9.f90
+++ b/libgomp/testsuite/libgomp.fortran/map-alloc-comp-9.f90
@@ -1,8 +1,19 @@
+! { dg-additional-options "-cpp" }
+!
! Ensure that polymorphic mapping is diagnosed as undefined behavior
! Ensure that static access to polymorphic variables works
+! Some extended tests are only run with shared memory
+! To enforce this (where possible) on the device side:
+! #define USE_USM_REQUIREMENT
+! which is done in map-alloc-comp-9-usm.f90
+
subroutine test(case)
implicit none(type, external)
+#ifdef USE_USM_REQUIREMENT
+ !$omp requires unified_shared_memory
+#endif
+
type t
integer :: x(4)
end type t
@@ -73,10 +84,14 @@ var4%y2(2)%y%x%x = -7 * [1111,2222,3333,4444]
var4%y2(2)%y%x2(1)%x = -8 * [1111,2222,3333,4444]
var4%y2(2)%y%x2(2)%x = -9 * [1111,2222,3333,4444]
+#ifdef USE_USM_REQUIREMENT
+is_shared_mem = .true.
+#else
is_shared_mem = .false.
!$omp target map(to: is_shared_mem)
is_shared_mem = .true.
!$omp end target
+#endif
if (case == 1) then
! implicit mapping
@@ -532,6 +547,10 @@ end subroutine test
program main
use omp_lib
implicit none(type, external)
+#ifdef USE_USM_REQUIREMENT
+ !$omp requires unified_shared_memory
+#endif
+
interface
subroutine test(case)
integer, value :: case