From: Chung-Lin Tang Date: Thu, 9 Dec 2021 16:38:20 +0000 (+0800) Subject: openmp: Fix libgomp.c++ testsuite errors for non-offload configs X-Git-Tag: basepoints/gcc-13~2454 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2766448c5cc3efc491fd9670f60b6b141ac3b456;p=thirdparty%2Fgcc.git 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 --git a/libgomp/testsuite/libgomp.c++/target-lambda-1.C b/libgomp/testsuite/libgomp.c++/target-lambda-1.C index 06c6470b4ffd..c5acbb8bf30c 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 #include diff --git a/libgomp/testsuite/libgomp.c++/target-this-3.C b/libgomp/testsuite/libgomp.c++/target-this-3.C index e15f69a16233..6049ba8e2013 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 #include 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 9f53677a2400..f0237c9b6b83 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 #include