diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2014-12-12 21:01:29 +0100 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gcc.gnu.org> | 2014-12-12 21:01:29 +0100 |
commit | 88c7eae209d973c8f7e72ba199e4153aef18992b (patch) | |
tree | 5b39045330f1e69106b22b54d784d1bba5ed41ce /gcc | |
parent | 8e25a61aca4163c9f11d993dbf8aff808c41c413 (diff) | |
download | gcc-88c7eae209d973c8f7e72ba199e4153aef18992b.zip gcc-88c7eae209d973c8f7e72ba199e4153aef18992b.tar.gz gcc-88c7eae209d973c8f7e72ba199e4153aef18992b.tar.bz2 |
OpenMP target nesting tests.
gcc/testsuite/
* c-c++-common/gomp/nesting-1.c: New file.
* c-c++-common/gomp/nesting-warn-1.c: Likewise.
From-SVN: r218687
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/c-c++-common/gomp/nesting-1.c | 75 | ||||
-rw-r--r-- | gcc/testsuite/c-c++-common/gomp/nesting-warn-1.c | 23 |
3 files changed, 103 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8e5b424..f2502ff 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-12-12 Thomas Schwinge <thomas@codesourcery.com> + + * c-c++-common/gomp/nesting-1.c: New file. + * c-c++-common/gomp/nesting-warn-1.c: Likewise. + 2014-12-12 Kai Tietz <ktietz@redhat.com> PR c++/63996 diff --git a/gcc/testsuite/c-c++-common/gomp/nesting-1.c b/gcc/testsuite/c-c++-common/gomp/nesting-1.c new file mode 100644 index 0000000..711ff8e --- /dev/null +++ b/gcc/testsuite/c-c++-common/gomp/nesting-1.c @@ -0,0 +1,75 @@ +extern int i; + +void +f_omp_parallel (void) +{ +#pragma omp parallel + { +#pragma omp parallel + ; + +#pragma omp target + ; + +#pragma omp target data + ; + +#pragma omp target update to(i) + +#pragma omp target data + { +#pragma omp parallel + ; + +#pragma omp target + ; + +#pragma omp target data + ; + +#pragma omp target update to(i) + } + } +} + +void +f_omp_target (void) +{ +#pragma omp target + { +#pragma omp parallel + ; + } +} + +void +f_omp_target_data (void) +{ +#pragma omp target data + { +#pragma omp parallel + ; + +#pragma omp target + ; + +#pragma omp target data + ; + +#pragma omp target update to(i) + +#pragma omp target data + { +#pragma omp parallel + ; + +#pragma omp target + ; + +#pragma omp target data + ; + +#pragma omp target update to(i) + } + } +} diff --git a/gcc/testsuite/c-c++-common/gomp/nesting-warn-1.c b/gcc/testsuite/c-c++-common/gomp/nesting-warn-1.c new file mode 100644 index 0000000..c39dd49 --- /dev/null +++ b/gcc/testsuite/c-c++-common/gomp/nesting-warn-1.c @@ -0,0 +1,23 @@ +extern int i; + +void +f_omp_target (void) +{ +#pragma omp target + { +#pragma omp target /* { dg-warning "target construct inside of target region" } */ + ; +#pragma omp target data /* { dg-warning "target data construct inside of target region" } */ + ; +#pragma omp target update to(i) /* { dg-warning "target update construct inside of target region" } */ + +#pragma omp parallel + { +#pragma omp target /* { dg-warning "target construct inside of target region" } */ + ; +#pragma omp target data /* { dg-warning "target data construct inside of target region" } */ + ; +#pragma omp target update to(i) /* { dg-warning "target update construct inside of target region" } */ + } + } +} |