[gcc r12-5859] openmp: Fix libgomp.c++ testsuite errors for non-offload configs
Chung-Lin Tang
cltang@gcc.gnu.org
Thu Dec 9 16:39:19 GMT 2021
https://gcc.gnu.org/g:2766448c5cc3efc491fd9670f60b6b141ac3b456
commit r12-5859-g2766448c5cc3efc491fd9670f60b6b141ac3b456
Author: Chung-Lin Tang <cltang@codesourcery.com>
Date: Fri Dec 10 00:38:20 2021 +0800
openmp: Fix libgomp.c++ testsuite errors for non-offload configs
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.
Diff:
---
libgomp/testsuite/libgomp.c++/target-lambda-1.C | 2 ++
libgomp/testsuite/libgomp.c++/target-this-3.C | 2 ++
libgomp/testsuite/libgomp.c++/target-this-4.C | 3 ++-
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/libgomp/testsuite/libgomp.c++/target-lambda-1.C b/libgomp/testsuite/libgomp.c++/target-lambda-1.C
index 06c6470b4ff..c5acbb8bf30 100644
--- a/libgomp/testsuite/libgomp.c++/target-lambda-1.C
+++ b/libgomp/testsuite/libgomp.c++/target-lambda-1.C
@@ -1,3 +1,5 @@
+// { dg-do run { target offload_device_nonshared_as } }
+
#include <cstdlib>
#include <cstring>
diff --git a/libgomp/testsuite/libgomp.c++/target-this-3.C b/libgomp/testsuite/libgomp.c++/target-this-3.C
index e15f69a1623..6049ba8e201 100644
--- a/libgomp/testsuite/libgomp.c++/target-this-3.C
+++ b/libgomp/testsuite/libgomp.c++/target-this-3.C
@@ -1,3 +1,5 @@
+// { dg-do run { target offload_device_nonshared_as } }
+
#include <stdio.h>
#include <string.h>
extern "C" void abort ();
diff --git a/libgomp/testsuite/libgomp.c++/target-this-4.C b/libgomp/testsuite/libgomp.c++/target-this-4.C
index 9f53677a240..f0237c9b6b8 100644
--- a/libgomp/testsuite/libgomp.c++/target-this-4.C
+++ b/libgomp/testsuite/libgomp.c++/target-this-4.C
@@ -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>
More information about the Gcc-cvs
mailing list