diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2022-07-05 12:21:33 +0200 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2022-07-07 12:38:51 +0200 |
commit | 9ef714539cb7cc1cd746312fd5dcc987bf167471 (patch) | |
tree | e32afd43b47308ce6be7d9bb90a2a11ce8a66e28 /libgomp/testsuite | |
parent | 5647e2c3853cbd51a6536a84b8eb0eb3c210dfbf (diff) | |
download | gcc-9ef714539cb7cc1cd746312fd5dcc987bf167471.zip gcc-9ef714539cb7cc1cd746312fd5dcc987bf167471.tar.gz gcc-9ef714539cb7cc1cd746312fd5dcc987bf167471.tar.bz2 |
Fix Intel MIC 'mkoffload' for OpenMP 'requires'
Similar to how the other 'mkoffload's got changed in
recent commit 683f11843974f0bdf42f79cdcbb0c2b43c7b81b0
"OpenMP: Move omp requires checks to libgomp".
This also means finally switching Intel MIC 'mkoffload' to
'GOMP_offload_register_ver', 'GOMP_offload_unregister_ver',
making 'GOMP_offload_register', 'GOMP_offload_unregister'
legacy entry points.
gcc/
* config/i386/intelmic-mkoffload.cc (generate_host_descr_file)
(prepare_target_image, main): Handle OpenMP 'requires'.
(generate_host_descr_file): Switch to 'GOMP_offload_register_ver',
'GOMP_offload_unregister_ver'.
libgomp/
* target.c (GOMP_offload_register, GOMP_offload_unregister):
Denote as legacy entry points.
* testsuite/lib/libgomp.exp
(check_effective_target_offload_target_any): New proc.
* testsuite/libgomp.c-c++-common/requires-1.c: Enable for
'offload_target_any'.
* testsuite/libgomp.c-c++-common/requires-3.c: Likewise.
* testsuite/libgomp.c-c++-common/requires-7.c: Likewise.
* testsuite/libgomp.fortran/requires-1.f90: Likewise.
Diffstat (limited to 'libgomp/testsuite')
-rw-r--r-- | libgomp/testsuite/lib/libgomp.exp | 5 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c-c++-common/requires-1.c | 2 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c-c++-common/requires-3.c | 2 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c-c++-common/requires-7.c | 2 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.fortran/requires-1.f90 | 2 |
5 files changed, 9 insertions, 4 deletions
diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp index 891f909..107a3c2 100644 --- a/libgomp/testsuite/lib/libgomp.exp +++ b/libgomp/testsuite/lib/libgomp.exp @@ -348,6 +348,11 @@ proc libgomp_check_effective_target_offload_target { target_name } { return 0 } +# Return 1 if compiling for any offload target. +proc check_effective_target_offload_target_any { } { + return [libgomp_check_effective_target_offload_target ""] +} + # Return 1 if compiling for offload target nvptx. proc check_effective_target_offload_target_nvptx { } { return [libgomp_check_effective_target_offload_target "nvptx"] diff --git a/libgomp/testsuite/libgomp.c-c++-common/requires-1.c b/libgomp/testsuite/libgomp.c-c++-common/requires-1.c index fedf977..ab9a8dd 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/requires-1.c +++ b/libgomp/testsuite/libgomp.c-c++-common/requires-1.c @@ -1,4 +1,4 @@ -/* { dg-do link { target { offload_target_nvptx || offload_target_amdgcn } } } */ +/* { dg-do link { target offload_target_any } } */ /* { dg-additional-sources requires-1-aux.c } */ /* Check diagnostic by device-compiler's lto1. diff --git a/libgomp/testsuite/libgomp.c-c++-common/requires-3.c b/libgomp/testsuite/libgomp.c-c++-common/requires-3.c index 7091f40..1c204c8a 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/requires-3.c +++ b/libgomp/testsuite/libgomp.c-c++-common/requires-3.c @@ -1,4 +1,4 @@ -/* { dg-do link { target { offload_target_nvptx || offload_target_amdgcn } } } */ +/* { dg-do link { target offload_target_any } } */ /* { dg-additional-sources requires-3-aux.c } */ /* Check diagnostic by device-compiler's lto1. diff --git a/libgomp/testsuite/libgomp.c-c++-common/requires-7.c b/libgomp/testsuite/libgomp.c-c++-common/requires-7.c index c94a4c1..7473aa6 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/requires-7.c +++ b/libgomp/testsuite/libgomp.c-c++-common/requires-7.c @@ -1,4 +1,4 @@ -/* { dg-do link { target { offload_target_nvptx || offload_target_amdgcn } } } */ +/* { dg-do link { target offload_target_any } } */ /* { dg-additional-sources requires-7-aux.c } */ /* Check diagnostic by device-compiler's lto1. diff --git a/libgomp/testsuite/libgomp.fortran/requires-1.f90 b/libgomp/testsuite/libgomp.fortran/requires-1.f90 index 33741af..e957b1b 100644 --- a/libgomp/testsuite/libgomp.fortran/requires-1.f90 +++ b/libgomp/testsuite/libgomp.fortran/requires-1.f90 @@ -1,4 +1,4 @@ -! { dg-do link { target { offload_target_nvptx || offload_target_amdgcn } } } +! { dg-do link { target offload_target_any } } ! { dg-additional-sources requires-1-aux.f90 } ! Check diagnostic by device-compiler's lto1. |