This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gomp4] Update fortran tests.
- From: James Norris <jnorris at codesourcery dot com>
- To: <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 11 Sep 2015 12:00:12 -0500
- Subject: [gomp4] Update fortran tests.
- Authentication-results: sourceware.org; auth=none
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
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