public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-5859] openmp: Fix libgomp.c++ testsuite errors for non-offload configs
@ 2021-12-09 16:39 Chung-Lin Tang
  0 siblings, 0 replies; only message in thread
From: Chung-Lin Tang @ 2021-12-09 16:39 UTC (permalink / raw)
  To: gcc-cvs

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>


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-09 16:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-09 16:39 [gcc r12-5859] openmp: Fix libgomp.c++ testsuite errors for non-offload configs Chung-Lin Tang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).