--- /dev/null
+/* { dg-require-effective-target omp_usm } */
+#pragma omp requires unified_shared_memory self_maps
+
+#include "map-arrayofstruct-2.c"
+
+/* No 'dg-shouldfail'. */
--- /dev/null
+/* { dg-require-effective-target omp_usm } */
+#pragma omp requires unified_shared_memory self_maps
+
+#include "map-arrayofstruct-3.c"
+
+/* No 'dg-shouldfail'. */
--- /dev/null
+/* { dg-require-effective-target omp_usm } */
+#pragma omp requires unified_shared_memory self_maps
+
+#include "struct-elem-5.c"
+
+/* No 'dg-shouldfail'. */
--- /dev/null
+/* { dg-require-effective-target omp_usm } */
+#pragma omp requires unified_shared_memory self_maps
+
+#include "target-present-1.c"
+
+/* No 'dg-shouldfail'. */
--- /dev/null
+/* { dg-require-effective-target omp_usm } */
+#pragma omp requires unified_shared_memory self_maps
+
+#include "target-present-2.c"
+
+/* No 'dg-shouldfail'. */
--- /dev/null
+/* { dg-require-effective-target omp_usm } */
+#pragma omp requires unified_shared_memory self_maps
+
+#include "target-present-3.c"
+
+/* No 'dg-shouldfail'. */
--- /dev/null
+! { dg-do run }
+
+! { dg-require-effective-target omp_usm }
+!$omp requires unified_shared_memory self_maps
+
+include 'map-subarray-5.f90'
+
+! No 'dg-shouldfail'.
--- /dev/null
+! { dg-do run }
+
+! { dg-require-effective-target omp_usm }
+!$omp requires unified_shared_memory self_maps
+
+include 'map-subarray-6.f90'
+
+! No 'dg-shouldfail'.
--- /dev/null
+! { dg-require-effective-target omp_usm }
+!$omp requires unified_shared_memory self_maps
+
+include 'map-subarray-7.f90'
+
+! No 'dg-shouldfail'.
--- /dev/null
+! { dg-do run }
+! { dg-additional-options "-cpp" }
+! { dg-require-effective-target omp_usm }
+! { dg-additional-options "-DOMP_USM" }
+! { dg-additional-options "-DMEM_SHARED" }
+
+#include "target-allocatable-1-1.f90"
program main
implicit none
+#ifdef OMP_USM
+ !$omp requires unified_shared_memory self_maps
+#endif
+
integer, allocatable :: a, b, c, d, e
allocate (a)
--- /dev/null
+! { dg-do run }
+! { dg-additional-options "-cpp" }
+! { dg-require-effective-target omp_usm }
+! { dg-additional-options "-DOMP_USM" }
+! { dg-additional-options "-DMEM_SHARED" }
+
+#include "target-allocatable-1-2.f90"
! { dg-additional-options "-DMEM_SHARED" { target offload_device_shared_as } }
module m
+#ifdef OMP_USM
+ !$omp requires unified_shared_memory self_maps
+#endif
+
contains
subroutine r (a, b, c, d, e)
implicit none
--- /dev/null
+! { dg-additional-options "-DMEM_SHARED" }
+! { dg-do run }
+
+! { dg-require-effective-target omp_usm }
+!$omp requires unified_shared_memory self_maps
+
+#include "target-enter-data-2.F90"
--- /dev/null
+! { dg-additional-options -cpp }
+! { dg-require-effective-target omp_usm }
+! { dg-additional-options -DOMP_USM }
+
+#include "target-present-1.f90"
+
+! No 'dg-shouldfail'.
+! { dg-additional-options -cpp }
+
program main
implicit none
+#ifdef OMP_USM
+ !$omp requires unified_shared_memory self_maps
+#endif
+
integer, parameter :: N = 100
integer :: a(N), b(N), c(N), i
--- /dev/null
+! { dg-additional-options -cpp }
+! { dg-require-effective-target omp_usm }
+! { dg-additional-options -DOMP_USM }
+
+#include "target-present-2.f90"
+
+! No 'dg-shouldfail'.
+! { dg-additional-options -cpp }
+
program main
implicit none
+#ifdef OMP_USM
+ !$omp requires unified_shared_memory self_maps
+#endif
+
integer, parameter :: N = 100
integer :: a(N), b(N), c(N), i
--- /dev/null
+! { dg-additional-options -cpp }
+! { dg-require-effective-target omp_usm }
+! { dg-additional-options -DOMP_USM }
+
+#include "target-present-3.f90"
+
+! No 'dg-shouldfail'.
+! { dg-additional-options -cpp }
+
program main
implicit none
+#ifdef OMP_USM
+ !$omp requires unified_shared_memory self_maps
+#endif
+
integer, parameter :: N = 100
integer :: a(N), b(N), c(N), i