gcc/libgomp/testsuite/libgomp.oacc-fortran/lib-12.f90
Tom de Vries 6dd580109f [libgomp, openacc, testsuite] Fix async logic in lib-12.f90
In testcase lib-12.f90, all acc_async_test calls are placed in a location
where they are not guaranteed to succeed, which explains why there's an xfail
for the lower optimization levels.

This patch fixes the problem by moving the acc_async_test calls to the correct
locations.

Reg-tested on x86_64 with nvptx accelerator.

2018-07-26  Tom de Vries  <tdevries@suse.de>

	* testsuite/libgomp.oacc-fortran/lib-12.f90: Move acc_async_test calls
	to correct locations.  Remove xfail.

From-SVN: r262990
2018-07-26 07:52:45 +00:00

26 lines
379 B
Fortran

! { dg-do run }
program main
use openacc
implicit none
integer :: i, j, n
j = 0
n = 1000000
!$acc parallel async (0) copy (j)
do i = 1, 1000000
j = j + 1
end do
!$acc end parallel
call acc_wait_async (0, 1)
call acc_wait (1)
if (acc_async_test (0) .neqv. .TRUE.) call abort
if (acc_async_test (1) .neqv. .TRUE.) call abort
end program