new file mode 100644
@@ -0,0 +1,8 @@
+/* { dg-do run { target openacc_nvidia_accel_selected } } */
+
+/* Define to 0 to have a regular spinlock.
+ Makes the test-case invalid OpenACC: there's nothing that guarantees that
+ the program will terminate. So, we only do this for nvptx. */
+#define SPIN_CNT_MAX 0
+
+#include "spin-lock-global.c"
new file mode 100644
@@ -0,0 +1,7 @@
+/* As in spin-lock-global-2.c. */
+/* { dg-do run { target openacc_nvidia_accel_selected } } */
+
+/* Also test without JIT optimization. */
+/* { dg-set-target-env-var GOMP_NVPTX_JIT "-O0" } */
+
+#include "spin-lock-global-2.c"
new file mode 100644
@@ -0,0 +1,8 @@
+/* { dg-do run { target openacc_nvidia_accel_selected } } */
+
+/* Define to 0 to have a regular spinlock.
+ Makes the test-case invalid OpenACC: there's nothing that guarantees that
+ the program will terminate. So, we only do this for nvptx. */
+#define SPIN_CNT_MAX 0
+
+#include "spin-lock-shared.c"
new file mode 100644
@@ -0,0 +1,7 @@
+/* As in spin-lock-global-2.c. */
+/* { dg-do run { target openacc_nvidia_accel_selected } } */
+
+/* Also test without JIT optimization. */
+/* { dg-set-target-env-var GOMP_NVPTX_JIT "-O0" } */
+
+#include "spin-lock-shared-2.c"