diff options
author | Ilya Verbin <ilya.verbin@intel.com> | 2014-10-14 17:13:45 +0400 |
---|---|---|
committer | Ilya Verbin <ilya.verbin@intel.com> | 2014-11-12 15:39:28 +0300 |
commit | 49ae5b96fb62826972af907d9f92a064f6a81cb3 (patch) | |
tree | 3808ec01eaf7cc9cd259fcbc236d863cae59fcbc /libgomp/testsuite/libgomp.c/examples-4/e.57.3.c | |
parent | b427800061d19be1965ab77157b23742e552cb52 (diff) | |
download | gcc-49ae5b96fb62826972af907d9f92a064f6a81cb3.tar.gz |
[PATCH 7] OpenMP 4.0 offloading infrastructure: testsuite
2014-10-15 Andrey Turetskiy <andrey.turetskiy@intel.com>
Ilya Verbin <ilya.verbin@intel.com>
Kirill Yukhin <kirill.yukhin@intel.com>
Ilya Tocar <ilya.tocar@intel.com>
libgomp/
* testsuite/lib/libgomp.exp
(check_effective_target_offload_device): New.
* testsuite/libgomp.c++/c++.exp: Include tests from subdirectories.
* testsuite/libgomp.c++/examples-4/e.51.5.C: New test.
* testsuite/libgomp.c++/examples-4/e.53.2.C: Ditto.
* testsuite/libgomp.c/examples-4/e.50.1.c: Ditto.
* testsuite/libgomp.c/examples-4/e.50.2.c: Ditto.
* testsuite/libgomp.c/examples-4/e.50.3.c: Ditto.
* testsuite/libgomp.c/examples-4/e.50.4.c: Ditto.
* testsuite/libgomp.c/examples-4/e.50.5.c: Ditto.
* testsuite/libgomp.c/examples-4/e.51.1.c: Ditto.
* testsuite/libgomp.c/examples-4/e.51.2.c: Ditto.
* testsuite/libgomp.c/examples-4/e.51.3.c: Ditto.
* testsuite/libgomp.c/examples-4/e.51.4.c: Ditto.
* testsuite/libgomp.c/examples-4/e.51.6.c: Ditto.
* testsuite/libgomp.c/examples-4/e.51.7.c: Ditto.
* testsuite/libgomp.c/examples-4/e.52.1.c: Ditto.
* testsuite/libgomp.c/examples-4/e.52.2.c: Ditto.
* testsuite/libgomp.c/examples-4/e.53.1.c: Ditto.
* testsuite/libgomp.c/examples-4/e.53.3.c: Ditto.
* testsuite/libgomp.c/examples-4/e.53.4.c: Ditto.
* testsuite/libgomp.c/examples-4/e.53.5.c: Ditto.
* testsuite/libgomp.c/examples-4/e.54.2.c: Ditto.
* testsuite/libgomp.c/examples-4/e.54.3.c: Ditto.
* testsuite/libgomp.c/examples-4/e.54.4.c: Ditto.
* testsuite/libgomp.c/examples-4/e.54.5.c: Ditto.
* testsuite/libgomp.c/examples-4/e.54.6.c: Ditto.
* testsuite/libgomp.c/examples-4/e.55.1.c: Ditto.
* testsuite/libgomp.c/examples-4/e.55.2.c: Ditto.
* testsuite/libgomp.c/examples-4/e.56.3.c: Ditto.
* testsuite/libgomp.c/examples-4/e.56.4.c: Ditto.
* testsuite/libgomp.c/examples-4/e.57.1.c: Ditto.
* testsuite/libgomp.c/examples-4/e.57.2.c: Ditto.
* testsuite/libgomp.c/examples-4/e.57.3.c: Ditto.
* testsuite/libgomp.c/target-7.c: Fix test.
* testsuite/libgomp.fortran/examples-4/e.50.1.f90: New test.
* testsuite/libgomp.fortran/examples-4/e.50.2.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.50.3.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.50.4.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.50.5.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.51.1.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.51.2.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.51.3.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.51.4.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.51.5.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.51.6.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.51.7.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.52.1.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.52.2.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.53.1.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.53.2.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.53.3.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.53.4.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.53.5.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.54.2.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.54.3.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.54.4.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.54.5.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.54.6.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.55.1.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.55.2.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.56.3.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.56.4.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.57.1.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.57.2.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/e.57.3.f90: Ditto.
Diffstat (limited to 'libgomp/testsuite/libgomp.c/examples-4/e.57.3.c')
-rw-r--r-- | libgomp/testsuite/libgomp.c/examples-4/e.57.3.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.c/examples-4/e.57.3.c b/libgomp/testsuite/libgomp.c/examples-4/e.57.3.c new file mode 100644 index 00000000000..8a0cf7c200d --- /dev/null +++ b/libgomp/testsuite/libgomp.c/examples-4/e.57.3.c @@ -0,0 +1,27 @@ +/* { dg-do run } */ +/* { dg-require-effective-target offload_device } */ + +#include <omp.h> +#include <stdlib.h> + +int main () +{ + int res; + int default_device = omp_get_default_device (); + + #pragma omp target + res = omp_is_initial_device (); + + if (res) + abort (); + + omp_set_default_device (omp_get_num_devices ()); + + #pragma omp target + res = omp_is_initial_device (); + + if (!res) + abort (); + + return 0; +} |