openmp: Fix libgomp.c++ testsuite errors for non-offload configs
authorChung-Lin Tang <cltang@codesourcery.com>
Thu, 9 Dec 2021 16:38:20 +0000 (00:38 +0800)
committerChung-Lin Tang <cltang@codesourcery.com>
Thu, 9 Dec 2021 16:39:03 +0000 (00:39 +0800)
Some testcases for libgomp.c++ only works for non-shared address space offloading,
because it exercises the zero-length array section behavior for offloaded
address space, testing for NULL/non-NULL cases.

libgomp/ChangeLog:

* testsuite/libgomp.c++/target-lambda-1.C: Only run under
"target offload_device_nonshared_as"
* testsuite/libgomp.c++/target-this-3.C: Likewise.
* testsuite/libgomp.c++/target-this-4.C: Likewise.

libgomp/testsuite/libgomp.c++/target-lambda-1.C
libgomp/testsuite/libgomp.c++/target-this-3.C
libgomp/testsuite/libgomp.c++/target-this-4.C

index 06c6470..c5acbb8 100644 (file)
@@ -1,3 +1,5 @@
+// { dg-do run { target offload_device_nonshared_as } }
+
 #include <cstdlib>
 #include <cstring>
 
index e15f69a..6049ba8 100644 (file)
@@ -1,3 +1,5 @@
+// { dg-do run { target offload_device_nonshared_as } }
+
 #include <stdio.h>
 #include <string.h>
 extern "C" void abort ();
index 9f53677..f0237c9 100644 (file)
@@ -1,6 +1,7 @@
-
 // We use 'auto' without a function return type, so specify dialect here
 // { dg-additional-options "-std=c++14" }
+// { dg-do run { target offload_device_nonshared_as } }
+
 #include <cstdlib>
 #include <cstring>