diff mbox

[gomp4] Update fortran tests.

Message ID 55F3089C.4090504@codesourcery.com
State New
Headers show

Commit Message

James Norris Sept. 11, 2015, 5 p.m. UTC
Hi!

Attached is a patch to update two (2) tests that
were failing because the test cases were incorrect.

Committed after regtesting on x86_64 and powerpc64le.

Thanks!
Jim
diff mbox

Patch

Index: lib-12.f90
===================================================================
--- lib-12.f90	(revision 227667)
+++ lib-12.f90	(working copy)
@@ -4,12 +4,14 @@  program main
   use openacc
   implicit none
 
-  integer :: i, n
+  integer :: i, j, n
 
+  j = 0
   n = 1000000
 
-  !$acc parallel async (0)
+  !$acc parallel async (0) copy (j)
     do i = 1, 1000000
+      j = j + 1
     end do
   !$acc end parallel
 
Index: lib-13.f90
===================================================================
--- lib-13.f90	(revision 227667)
+++ lib-13.f90	(working copy)
@@ -4,17 +4,22 @@  program main
   use openacc
   implicit none
 
-  integer :: i, j, nprocs
+  integer :: i, j
   integer, parameter :: N = 1000000
+  integer, parameter :: nprocs = 2
+  integer :: k(nprocs)
 
-  nprocs = 2
+  k(:) = 0
 
-  do j = 1, nprocs
-    !$acc parallel async (j)
-      do i = 1, N
-      end do
-    !$acc end parallel
-  end do
+  !$acc data copy (k(1:nprocs))
+    do j = 1, nprocs
+      !$acc parallel async (j)
+        do i = 1, N
+          k(j) = k(j) + 1
+        end do
+      !$acc end parallel
+    end do
+  !$acc end data
 
   if (acc_async_test (1) .neqv. .TRUE.) call abort
   if (acc_async_test (2) .neqv. .TRUE.) call abort