This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gomp4] Fix some broken tests
- From: Nathan Sidwell <nathan at acm dot org>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 10 Nov 2015 15:35:08 -0500
- Subject: [gomp4] Fix some broken tests
- Authentication-results: sourceware.org; auth=none
I've committed this to gomp4. In preparing the reworked firstprivate patch
changes for gomp4's gimplify.c I discovered these testcases were passing by
accident, and lacked a data clause.
nathan
2015-11-10 Nathan Sidwell <nathan@codesourcery.com>
* testsuite/libgomp.oacc-fortran/parallel-reduction.f90: Fix data
missing data clause.
* testsuite/libgomp.oacc-c-c++-common/parallel-reduction.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/par-reduction-1.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-1.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/par-reduction-2.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-3.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-4.c: Likewise.
Index: libgomp/testsuite/libgomp.oacc-fortran/parallel-reduction.f90
===================================================================
--- libgomp/testsuite/libgomp.oacc-fortran/parallel-reduction.f90 (revision 230116)
+++ libgomp/testsuite/libgomp.oacc-fortran/parallel-reduction.f90 (working copy)
@@ -7,7 +7,7 @@ program reduction
sum = 0
- !$acc parallel reduction(+:sum) num_gangs (n)
+ !$acc parallel reduction(+:sum) num_gangs (n) copy(sum)
sum = sum + 1
!$acc end parallel
@@ -32,7 +32,7 @@ end program reduction
subroutine redsub(sum, n)
integer :: sum, n
- !$acc parallel reduction(+:sum) num_gangs (10)
+ !$acc parallel reduction(+:sum) num_gangs (10) copy(sum)
sum = sum + 1
!$acc end parallel
end subroutine redsub
Index: libgomp/testsuite/libgomp.oacc-c-c++-common/parallel-reduction.c
===================================================================
--- libgomp/testsuite/libgomp.oacc-c-c++-common/parallel-reduction.c (revision 230116)
+++ libgomp/testsuite/libgomp.oacc-c-c++-common/parallel-reduction.c (working copy)
@@ -14,7 +14,7 @@ main ()
#pragma acc data copy (dummy)
{
-#pragma acc parallel num_gangs (N) reduction (+:s1)
+#pragma acc parallel num_gangs (N) reduction (+:s1) copy(s1)
{
s1++;
}
@@ -34,7 +34,7 @@ main ()
s1 = 0;
s2 = 0;
-#pragma acc parallel num_gangs (10) reduction (+:s1, s2)
+#pragma acc parallel num_gangs (10) reduction (+:s1, s2) copy(s1, s2)
{
s1++;
s2 += N;
@@ -57,7 +57,7 @@ main ()
s1 = 0;
-#pragma acc parallel num_gangs (10) reduction (+:s1)
+#pragma acc parallel num_gangs (10) reduction (+:s1) copy(s1)
{
#pragma acc loop gang reduction (+:s1)
for (i = 0; i < 10; i++)
Index: libgomp/testsuite/libgomp.oacc-c-c++-common/par-reduction-1.c
===================================================================
--- libgomp/testsuite/libgomp.oacc-c-c++-common/par-reduction-1.c (revision 230116)
+++ libgomp/testsuite/libgomp.oacc-c-c++-common/par-reduction-1.c (working copy)
@@ -15,7 +15,7 @@ main (int argc, char *argv[])
# define GANGS 256
#endif
#pragma acc parallel num_gangs(GANGS) num_workers(32) vector_length(32) \
- reduction(+:res1) copy(res2)
+ reduction(+:res1) copy(res2, res1)
{
res1 += 5;
@@ -36,7 +36,7 @@ main (int argc, char *argv[])
# define GANGS 8
#endif
#pragma acc parallel num_gangs(GANGS) num_workers(32) vector_length(32) \
- reduction(*:res1) copy(res2)
+ reduction(*:res1) copy(res1, res2)
{
res1 *= 5;
Index: libgomp/testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-1.c
===================================================================
--- libgomp/testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-1.c (revision 230116)
+++ libgomp/testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-1.c (working copy)
@@ -13,7 +13,7 @@ main (int argc, char *argv[])
arr[i] = i;
#pragma acc parallel num_gangs(32) num_workers(32) vector_length(32) \
- reduction(+:res)
+ reduction(+:res) copy(res)
{
#pragma acc loop gang
for (j = 0; j < 32; j++)
Index: libgomp/testsuite/libgomp.oacc-c-c++-common/par-reduction-2.c
===================================================================
--- libgomp/testsuite/libgomp.oacc-c-c++-common/par-reduction-2.c (revision 230116)
+++ libgomp/testsuite/libgomp.oacc-c-c++-common/par-reduction-2.c (working copy)
@@ -14,7 +14,7 @@ main (int argc, char *argv[])
# define GANGS 256
#endif
#pragma acc parallel num_gangs(GANGS) num_workers(32) vector_length(32) \
- reduction(+:res1) copy(res2) async(1)
+ reduction(+:res1) copy(res1, res2) async(1)
{
res1 += 5;
@@ -37,7 +37,7 @@ main (int argc, char *argv[])
# define GANGS 8
#endif
#pragma acc parallel num_gangs(GANGS) num_workers(32) vector_length(32) \
- reduction(*:res1) copy(res2) async(1)
+ reduction(*:res1) copy(res1, res2) async(1)
{
res1 *= 5;
Index: libgomp/testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-3.c
===================================================================
--- libgomp/testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-3.c (revision 230116)
+++ libgomp/testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-3.c (working copy)
@@ -14,7 +14,7 @@ main (int argc, char *argv[])
arr[i] = i;
#pragma acc parallel num_gangs(32) num_workers(32) vector_length(32) \
- reduction(+:res)
+ reduction(+:res) copy(res)
{
#pragma acc loop gang
for (j = 0; j < 32; j++)
Index: libgomp/testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-4.c
===================================================================
--- libgomp/testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-4.c (revision 230116)
+++ libgomp/testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-4.c (working copy)
@@ -14,7 +14,7 @@ main (int argc, char *argv[])
arr[i] = i;
#pragma acc parallel num_gangs(32) num_workers(32) vector_length(32) \
- reduction(+:res) reduction(max:mres)
+ reduction(+:res) reduction(max:mres) copy(res, mres)
{
#pragma acc loop gang
for (j = 0; j < 32; j++)