summaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-4.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2015-11-04 20:48:05 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2015-11-04 20:48:05 +0000
commitccc8282babb2336eab6457a0541a884348c7bafb (patch)
treede1b37438999069c57346d089b4b0fe252206895 /libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-4.c
parenta3afde42598578a00cd15c98e70c14f704bc39ae (diff)
downloadgcc-ccc8282babb2336eab6457a0541a884348c7bafb.tar.gz
nvptx.c (nvptx_goacc_validate_dims): Add checking.
gcc/ * config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Add checking. libgomp/ * testsuite/libgomp.oacc-fortran/reduction-1.f90: Fix dimensions and reduction copy. * testsuite/libgomp.oacc-fortran/reduction-2.f90: Likewise. * testsuite/libgomp.oacc-fortran/reduction-3.f90: Likewise. * testsuite/libgomp.oacc-fortran/reduction-4.f90: Likewise. * testsuite/libgomp.oacc-fortran/reduction-6.f90: Likewise. * testsuite/libgomp.oacc-c-c++-common/par-reduction-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-3.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/collapse-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/par-reduction-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-4.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-initial-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-5.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: New. From-SVN: r229780
Diffstat (limited to 'libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-4.c')
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-4.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-4.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-4.c
index eab24281514..a89a96de736 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-4.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-4.c
@@ -24,7 +24,7 @@ main(void)
vresult = 0;
/* '+' reductions. */
-#pragma acc parallel vector_length (vl)
+#pragma acc parallel vector_length (vl) copy(result)
#pragma acc loop reduction (+:result)
for (i = 0; i < n; i++)
result += array[i];
@@ -94,7 +94,7 @@ main(void)
lvresult = false;
/* '&&' reductions. */
-#pragma acc parallel vector_length (vl)
+#pragma acc parallel vector_length (vl) copy(lresult)
#pragma acc loop reduction (&&:lresult)
for (i = 0; i < n; i++)
lresult = lresult && (creal(result) > creal(array[i]));
@@ -113,7 +113,7 @@ main(void)
lvresult = false;
/* '||' reductions. */
-#pragma acc parallel vector_length (vl)
+#pragma acc parallel vector_length (vl) copy(lresult)
#pragma acc loop reduction (||:lresult)
for (i = 0; i < n; i++)
lresult = lresult || (creal(result) > creal(array[i]));