This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gomp4] Fix some gomp tests


I've committed this to gomp4 branch. It fixes some tests that were incorrect and fail with some development I am working on.

nathan
2015-07-25  Nathan Sidwell  <nathan@codesourcery.com>

	* testsuite/libgomp.oacc-c-c++-common/reduction-2.c: Copy lresult,
	not result for logical reductions.
	* testsuite/libgomp.oacc-c-c++-common/reduction-3.c: Likewise.
	* testsuite/libgomp.oacc-fortran/data-2.f90: Add present clauses
	to parallels.
	* testsuite/libgomp.oacc-fortran/lib-14.f90: Likewise.

Index: libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-2.c
===================================================================
--- libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-2.c	(revision 226189)
+++ libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-2.c	(working copy)
@@ -90,7 +90,7 @@ main(void)
   lvresult = 0;
 
   /* '&&' reductions.  */
-#pragma acc parallel num_gangs (ng) copy (result)
+#pragma acc parallel num_gangs (ng) copy (lresult)
 #pragma acc loop reduction (&&:lresult) gang
   for (i = 0; i < n; i++)
     lresult = lresult && (result > array[i]);
@@ -109,7 +109,7 @@ main(void)
   lvresult = 0;
 
   /* '||' reductions.  */
-#pragma acc parallel num_gangs (ng) copy (result)
+#pragma acc parallel num_gangs (ng) copy (lresult)
 #pragma acc loop reduction (||:lresult) gang
   for (i = 0; i < n; i++)
     lresult = lresult || (result > array[i]);
Index: libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-3.c
===================================================================
--- libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-3.c	(revision 226189)
+++ libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-3.c	(working copy)
@@ -90,7 +90,7 @@ main(void)
   lvresult = 0;
 
   /* '&&' reductions.  */
-#pragma acc parallel num_gangs (ng) copy (result)
+#pragma acc parallel num_gangs (ng) copy (lresult)
 #pragma acc loop reduction (&&:lresult) gang
   for (i = 0; i < n; i++)
     lresult = lresult && (result > array[i]);
@@ -109,7 +109,7 @@ main(void)
   lvresult = 0;
 
   /* '||' reductions.  */
-#pragma acc parallel num_gangs (ng) copy (result)
+#pragma acc parallel num_gangs (ng) copy (lresult)
 #pragma acc loop reduction (||:lresult) gang
   for (i = 0; i < n; i++)
     lresult = lresult || (result > array[i]);
Index: libgomp/testsuite/libgomp.oacc-fortran/data-2.f90
===================================================================
--- libgomp/testsuite/libgomp.oacc-fortran/data-2.f90	(revision 226189)
+++ libgomp/testsuite/libgomp.oacc-fortran/data-2.f90	(working copy)
@@ -19,7 +19,7 @@ program test
 
   !$acc enter data copyin (a(1:N,1:N), b(1:N,1:N))
 
-  !$acc parallel
+  !$acc parallel present (a(1:N,1:N), b(1:N,1:N))
   do i = 1, n
     do j = 1, n
       b(j,i) = a (j,i)
@@ -45,7 +45,7 @@ program test
   !$acc enter data copyin (c(1:N)) create (d(1:N)) async
   !$acc wait
   
-  !$acc parallel 
+  !$acc parallel present (c(1:N), d(1:N))
     do i = 1, N
       d(i) = c(i) + 1
     end do
@@ -65,7 +65,7 @@ program test
   !$acc enter data create (d(1:N)) wait
   !$acc wait
 
-  !$acc parallel 
+  !$acc parallel present (c(1:N), d(1:N))
     do i = 1, N
       d(i) = c(i) + 1
     end do
@@ -128,7 +128,7 @@ program test
   if (acc_is_present (c) .eqv. .FALSE.) call abort
   if (acc_is_present (d) .eqv. .FALSE.) call abort
 
-  !$acc parallel
+  !$acc parallel present (c(0:N), d(0:N))
     do i = 1, N
       c(i) = 1.0;
       d(i) = 2.0;
Index: libgomp/testsuite/libgomp.oacc-fortran/lib-14.f90
===================================================================
--- libgomp/testsuite/libgomp.oacc-fortran/lib-14.f90	(revision 226189)
+++ libgomp/testsuite/libgomp.oacc-fortran/lib-14.f90	(working copy)
@@ -46,7 +46,7 @@ program main
 
   if (acc_is_present (h) .neqv. .TRUE.) call abort
 
-  !$acc parallel loop
+  !$acc parallel loop present (h)
     do i = 1, N
       h(i) = i
     end do

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]