* testsuite/libgomp.oacc-fortran/abort-1.f90: Add 'dg-do run'.
* testsuite/libgomp.oacc-fortran/abort-2.f90: Ditto.
* testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90: Ditto.
* testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f90: Ditto.
* testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f90: Ditto.
* testsuite/libgomp.oacc-fortran/lib-1.f90: Ditto.
* testsuite/libgomp.oacc-fortran/common-block-1.f90:
Use 'stop' not abort().
* testsuite/libgomp.oacc-fortran/common-block-2.f90: Ditto.
* testsuite/libgomp.oacc-fortran/common-block-3.f90: Ditto.
* testsuite/libgomp.oacc-fortran/data-1.f90: Ditto.
* testsuite/libgomp.oacc-fortran/data-2.f90: Ditto.
* testsuite/libgomp.oacc-fortran/data-5.f90: Ditto.
* testsuite/libgomp.oacc-fortran/dummy-array.f90: Ditto.
* testsuite/libgomp.oacc-fortran/gemm-2.f90: Ditto.
* testsuite/libgomp.oacc-fortran/gemm.f90: Ditto.
* testsuite/libgomp.oacc-fortran/host_data-2.f90: Ditto.
* testsuite/libgomp.oacc-fortran/host_data-3.f90: Ditto.
* testsuite/libgomp.oacc-fortran/host_data-4.f90: Ditto.
* testsuite/libgomp.oacc-fortran/kernels-collapse-3.f90: Ditto.
* testsuite/libgomp.oacc-fortran/kernels-collapse-4.f90: Ditto.
* testsuite/libgomp.oacc-fortran/kernels-independent.f90: Ditto.
* testsuite/libgomp.oacc-fortran/kernels-loop-1.f90: Ditto.
* testsuite/libgomp.oacc-fortran/kernels-map-1.f90: Ditto.
* testsuite/libgomp.oacc-fortran/kernels-parallel-loop-data-enter-exit.f95:
Ditto.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-1.f90:
Ditto.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-2.f90:
Ditto.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-3.f90:
Ditto.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-6.f90:
Ditto.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-vector-1.f90:
Ditto.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-vector-2.f90:
Ditto.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-1.f90:
Ditto.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-2.f90:
Ditto.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-3.f90:
Ditto.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-4.f90:
Ditto.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-5.f90:
Ditto.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-6.f90:
Ditto.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-7.f90:
Ditto.
* testsuite/libgomp.oacc-fortran/kernels-reduction-1.f90: Ditto.
* testsuite/libgomp.oacc-fortran/lib-12.f90: Ditto.
* testsuite/libgomp.oacc-fortran/lib-13.f90: Ditto.
* testsuite/libgomp.oacc-fortran/lib-14.f90: Ditto.
* testsuite/libgomp.oacc-fortran/kernels-acc-loop-reduction-2.f90:
Likewise and also add 'dg-do run'.
* testsuite/libgomp.oacc-fortran/kernels-acc-loop-reduction.f90:
Ditto.
From-SVN: r277503
+2019-10-28 Tobias Burnus <tobias@codesourcery.com>
+
+ * testsuite/libgomp.oacc-fortran/abort-1.f90: Add 'dg-do run'.
+ * testsuite/libgomp.oacc-fortran/abort-2.f90: Ditto.
+ * testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90: Ditto.
+ * testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f90: Ditto.
+ * testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f90: Ditto.
+ * testsuite/libgomp.oacc-fortran/lib-1.f90: Ditto.
+ * testsuite/libgomp.oacc-fortran/common-block-1.f90:
+ Use 'stop' not abort().
+ * testsuite/libgomp.oacc-fortran/common-block-2.f90: Ditto.
+ * testsuite/libgomp.oacc-fortran/common-block-3.f90: Ditto.
+ * testsuite/libgomp.oacc-fortran/data-1.f90: Ditto.
+ * testsuite/libgomp.oacc-fortran/data-2.f90: Ditto.
+ * testsuite/libgomp.oacc-fortran/data-5.f90: Ditto.
+ * testsuite/libgomp.oacc-fortran/dummy-array.f90: Ditto.
+ * testsuite/libgomp.oacc-fortran/gemm-2.f90: Ditto.
+ * testsuite/libgomp.oacc-fortran/gemm.f90: Ditto.
+ * testsuite/libgomp.oacc-fortran/host_data-2.f90: Ditto.
+ * testsuite/libgomp.oacc-fortran/host_data-3.f90: Ditto.
+ * testsuite/libgomp.oacc-fortran/host_data-4.f90: Ditto.
+ * testsuite/libgomp.oacc-fortran/kernels-collapse-3.f90: Ditto.
+ * testsuite/libgomp.oacc-fortran/kernels-collapse-4.f90: Ditto.
+ * testsuite/libgomp.oacc-fortran/kernels-independent.f90: Ditto.
+ * testsuite/libgomp.oacc-fortran/kernels-loop-1.f90: Ditto.
+ * testsuite/libgomp.oacc-fortran/kernels-map-1.f90: Ditto.
+ * testsuite/libgomp.oacc-fortran/kernels-parallel-loop-data-enter-exit.f95:
+ Ditto.
+ * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-1.f90:
+ Ditto.
+ * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-2.f90:
+ Ditto.
+ * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-3.f90:
+ Ditto.
+ * testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-6.f90:
+ Ditto.
+ * testsuite/libgomp.oacc-fortran/kernels-private-vars-vector-1.f90:
+ Ditto.
+ * testsuite/libgomp.oacc-fortran/kernels-private-vars-vector-2.f90:
+ Ditto.
+ * testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-1.f90:
+ Ditto.
+ * testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-2.f90:
+ Ditto.
+ * testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-3.f90:
+ Ditto.
+ * testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-4.f90:
+ Ditto.
+ * testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-5.f90:
+ Ditto.
+ * testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-6.f90:
+ Ditto.
+ * testsuite/libgomp.oacc-fortran/kernels-private-vars-worker-7.f90:
+ Ditto.
+ * testsuite/libgomp.oacc-fortran/kernels-reduction-1.f90: Ditto.
+ * testsuite/libgomp.oacc-fortran/lib-12.f90: Ditto.
+ * testsuite/libgomp.oacc-fortran/lib-13.f90: Ditto.
+ * testsuite/libgomp.oacc-fortran/lib-14.f90: Ditto.
+ * testsuite/libgomp.oacc-fortran/kernels-acc-loop-reduction-2.f90:
+ Likewise and also add 'dg-do run'.
+ * testsuite/libgomp.oacc-fortran/kernels-acc-loop-reduction.f90:
+ Ditto.
+
2019-10-25 Cesar Philippidis <cesar@codesourcery.com>
Tobias Burnus <tobias@codesourcery.com>
+! { dg-do run }
+!
! Verify that an unconditional "call abort" inside an OpenACC parallel region
! does the right thing.
+! { dg-do run }
+!
! Verify that a conditional "call abort" inside an OpenACC parallel region does
! the right thing.
+! { dg-do run }
! { dg-additional-options "-cpp" }
+!
! TODO: Have to disable the acc_on_device builtin for we want to test the
! libgomp library function? The command line option
! '-fno-builtin-acc_on_device' is valid for C/C++/ObjC/ObjC++ but not for
+! { dg-do run }
! { dg-additional-options "-cpp" }
+!
! TODO: Have to disable the acc_on_device builtin for we want to test
! the libgomp library function? The command line option
! '-fno-builtin-acc_on_device' is valid for C/C++/ObjC/ObjC++ but not
+! { dg-do run }
! { dg-additional-options "-cpp" }
+!
! TODO: Have to disable the acc_on_device builtin for we want to test
! the libgomp library function? The command line option
! '-fno-builtin-acc_on_device' is valid for C/C++/ObjC/ObjC++ but not
common /BLOCK/ x, y
do i = 1, n
- if (x(i) .ne. y) call abort
+ if (x(i) .ne. y) stop 1
end do
end subroutine check
common /BLOCK/ x, y, z, j
do i = 1, n
- if (abs(x(i) - i - z) .ge. 0.0001) call abort
+ if (abs(x(i) - i - z) .ge. 0.0001) stop 1
end do
end subroutine validate
end do
!$acc end parallel
- if (j .ne. n) call abort
+ if (j .ne. n) stop 2
! Test firstprivate, copy
common /BLOCK/ x, y, z, j
do i = 1, n
- if (abs(x(i) - i - z) .ge. 0.0001) call abort
+ if (abs(x(i) - i - z) .ge. 0.0001) stop 1
end do
end subroutine validate
end do
!$acc end parallel loop
- if (j .ne. n) call abort
+ if (j .ne. n) stop 2
end program main
j = -2
!$acc data copyin (i, j)
- if (is_mapped (i) .eqv. .FALSE.) call abort
- if (is_mapped (j) .eqv. .FALSE.) call abort
+ if (is_mapped (i) .eqv. .FALSE.) stop 1
+ if (is_mapped (j) .eqv. .FALSE.) stop 2
- if (i .ne. -1 .or. j .ne. -2) call abort
+ if (i .ne. -1 .or. j .ne. -2) stop 3
i = 2
j = 1
- if (i .ne. 2 .or. j .ne. 1) call abort
+ if (i .ne. 2 .or. j .ne. 1) stop 4
!$acc end data
- if (i .ne. 2 .or. j .ne. 1) call abort
+ if (i .ne. 2 .or. j .ne. 1) stop 5
i = -1
j = -2
!$acc data copyout (i, j)
- if (is_mapped (i) .eqv. .FALSE.) call abort
- if (is_mapped (j) .eqv. .FALSE.) call abort
+ if (is_mapped (i) .eqv. .FALSE.) stop 6
+ if (is_mapped (j) .eqv. .FALSE.) stop 7
- if (i .ne. -1 .or. j .ne. -2) call abort
+ if (i .ne. -1 .or. j .ne. -2) stop 8
i = 2
j = 1
- if (i .ne. 2 .or. j .ne. 1) call abort
+ if (i .ne. 2 .or. j .ne. 1) stop 9
!$acc parallel present (i, j)
i = 4
!$acc end parallel
!$acc end data
- if (i .ne. 4 .or. j .ne. 2) call abort
+ if (i .ne. 4 .or. j .ne. 2) stop 10
i = -1
j = -2
!$acc data create (i, j)
- if (is_mapped (i) .eqv. .FALSE.) call abort
- if (is_mapped (j) .eqv. .FALSE.) call abort
+ if (is_mapped (i) .eqv. .FALSE.) stop 11
+ if (is_mapped (j) .eqv. .FALSE.) stop 12
- if (i .ne. -1 .or. j .ne. -2) call abort
+ if (i .ne. -1 .or. j .ne. -2) stop 13
i = 2
j = 1
- if (i .ne. 2 .or. j .ne. 1) call abort
+ if (i .ne. 2 .or. j .ne. 1) stop 14
!$acc end data
- if (i .ne. 2 .or. j .ne. 1) call abort
+ if (i .ne. 2 .or. j .ne. 1) stop 15
i = -1
j = -2
!$acc data present_or_copyin (i, j)
- if (is_mapped (i) .eqv. .FALSE.) call abort
- if (is_mapped (j) .eqv. .FALSE.) call abort
+ if (is_mapped (i) .eqv. .FALSE.) stop 16
+ if (is_mapped (j) .eqv. .FALSE.) stop 17
- if (i .ne. -1 .or. j .ne. -2) call abort
+ if (i .ne. -1 .or. j .ne. -2) stop 18
i = 2
j = 1
- if (i .ne. 2 .or. j .ne. 1) call abort
+ if (i .ne. 2 .or. j .ne. 1) stop 19
!$acc end data
- if (i .ne. 2 .or. j .ne. 1) call abort
+ if (i .ne. 2 .or. j .ne. 1) stop 20
i = -1
j = -2
!$acc data present_or_copyout (i, j)
- if (is_mapped (i) .eqv. .FALSE.) call abort
- if (is_mapped (j) .eqv. .FALSE.) call abort
+ if (is_mapped (i) .eqv. .FALSE.) stop 21
+ if (is_mapped (j) .eqv. .FALSE.) stop 22
- if (i .ne. -1 .or. j .ne. -2) call abort
+ if (i .ne. -1 .or. j .ne. -2) stop 23
i = 2
j = 1
- if (i .ne. 2 .or. j .ne. 1) call abort
+ if (i .ne. 2 .or. j .ne. 1) stop 24
!$acc parallel present (i, j)
i = 4
!$acc end parallel
!$acc end data
- if (i .ne. 4 .or. j .ne. 2) call abort
+ if (i .ne. 4 .or. j .ne. 2) stop 25
i = -1
j = -2
!$acc data present_or_copy (i, j)
- if (is_mapped (i) .eqv. .FALSE.) call abort
- if (is_mapped (j) .eqv. .FALSE.) call abort
+ if (is_mapped (i) .eqv. .FALSE.) stop 26
+ if (is_mapped (j) .eqv. .FALSE.) stop 27
- if (i .ne. -1 .or. j .ne. -2) call abort
+ if (i .ne. -1 .or. j .ne. -2) stop 28
i = 2
j = 1
- if (i .ne. 2 .or. j .ne. 1) call abort
+ if (i .ne. 2 .or. j .ne. 1) stop 29
!$acc end data
#if ACC_MEM_SHARED
- if (i .ne. 2 .or. j .ne. 1) call abort
+ if (i .ne. 2 .or. j .ne. 1) stop 30
#else
- if (i .ne. -1 .or. j .ne. -2) call abort
+ if (i .ne. -1 .or. j .ne. -2) stop 31
#endif
i = -1
j = -2
!$acc data present_or_create (i, j)
- if (is_mapped (i) .eqv. .FALSE.) call abort
- if (is_mapped (j) .eqv. .FALSE.) call abort
+ if (is_mapped (i) .eqv. .FALSE.) stop 32
+ if (is_mapped (j) .eqv. .FALSE.) stop 33
i = 2
j = 1
- if (i .ne. 2 .or. j .ne. 1) call abort
+ if (i .ne. 2 .or. j .ne. 1) stop 34
!$acc end data
- if (i .ne. 2 .or. j .ne. 1) call abort
+ if (i .ne. 2 .or. j .ne. 1) stop 35
i = -1
j = -2
!$acc data copyin (i, j)
!$acc data present (i, j)
- if (is_mapped (i) .eqv. .FALSE.) call abort
- if (is_mapped (j) .eqv. .FALSE.) call abort
+ if (is_mapped (i) .eqv. .FALSE.) stop 36
+ if (is_mapped (j) .eqv. .FALSE.) stop 37
- if (i .ne. -1 .or. j .ne. -2) call abort
+ if (i .ne. -1 .or. j .ne. -2) stop 38
i = 2
j = 1
- if (i .ne. 2 .or. j .ne. 1) call abort
+ if (i .ne. 2 .or. j .ne. 1) stop 39
!$acc end data
!$acc end data
- if (i .ne. 2 .or. j .ne. 1) call abort
+ if (i .ne. 2 .or. j .ne. 1) stop 40
i = -1
j = -2
!$acc data copyin (i, j)
!$acc data present (i, j)
- if (is_mapped (i) .eqv. .FALSE.) call abort
- if (is_mapped (j) .eqv. .FALSE.) call abort
+ if (is_mapped (i) .eqv. .FALSE.) stop 41
+ if (is_mapped (j) .eqv. .FALSE.) stop 42
- if (i .ne. -1 .or. j .ne. -2) call abort
+ if (i .ne. -1 .or. j .ne. -2) stop 43
i = 2
j = 1
- if (i .ne. 2 .or. j .ne. 1) call abort
+ if (i .ne. 2 .or. j .ne. 1) stop 44
!$acc end data
!$acc end data
- if (i .ne. 2 .or. j .ne. 1) call abort
+ if (i .ne. 2 .or. j .ne. 1) stop 45
i = -1
j = -2
!$acc data
#if !ACC_MEM_SHARED
- if (is_mapped (i) .eqv. .TRUE.) call abort
- if (is_mapped (j) .eqv. .TRUE.) call abort
+ if (is_mapped (i) .eqv. .TRUE.) stop 46
+ if (is_mapped (j) .eqv. .TRUE.) stop 47
#endif
- if (i .ne. -1 .or. j .ne. -2) call abort
+ if (i .ne. -1 .or. j .ne. -2) stop 48
i = 2
j = 1
- if (i .ne. 2 .or. j .ne. 1) call abort
+ if (i .ne. 2 .or. j .ne. 1) stop 49
!$acc end data
- if (i .ne. 2 .or. j .ne. 1) call abort
+ if (i .ne. 2 .or. j .ne. 1) stop 50
end program main
!$acc wait
do i = 1, N
- if (d(i) .ne. 4.0) call abort
+ if (d(i) .ne. 4.0) STOP 3
end do
c(:) = 3.0
!$acc wait
do i = 1, N
- if (d(i) .ne. 4.0) call abort
+ if (d(i) .ne. 4.0) STOP 4
end do
end program test
if (h(i) .eq. i) c = c + 1
end do
! h[] should be filled with uninitialized device values,
- ! abort if it's not.
- if (c .eq. N) call abort
+ ! 'stop' if it's not.
+ if (c .eq. N) stop 1
h(:) = 0
! No actual copyout should happen.
call acc_copyout (h)
do i = 1, N
- if (h(i) .ne. 0) call abort
+ if (h(i) .ne. 0) stop 2
end do
!$acc exit data delete (h(1:N))
! This should not actually be deleted yet.
- if (acc_is_present (h) .eqv. .FALSE.) call abort
+ if (acc_is_present (h) .eqv. .FALSE.) stop 3
!$acc exit data copyout (h(1:N)) finalize
do i = 1, N
- if (h(i) .ne. 111) call abort
+ if (h(i) .ne. 111) stop 4
end do
- if (acc_is_present (h) .eqv. .TRUE.) call abort
+ if (acc_is_present (h) .eqv. .TRUE.) stop 5
end program refcount_test
call dummy_array (a, n)
do i = 1, n
- if (a(i) .ne. i) call abort
+ if (a(i) .ne. i) stop 1
end do
end program main
do i = 1, m
do j = 1, n
- if (c(i,j) /= e(i,j)) call abort
+ if (c(i,j) /= e(i,j)) stop 1
end do
end do
end program main
do i = 1, m
do j = 1, n
- if (d(i,j) /= e(i,j)) call abort
+ if (d(i,j) /= e(i,j)) stop 1
end do
end do
end program main
real*4 :: a(n), b(n)
do i = 1, N
- if (abs(a(i) - b(i)) > 0.0001) call abort
+ if (abs(a(i) - b(i)) > 0.0001) stop 1
end do
end subroutine validate_results
real*4 :: a(n), b(n)
do i = 1, N
- if (abs(a(i) - b(i)) > 0.0001) call abort
+ if (abs(a(i) - b(i)) > 0.0001) stop 1
end do
end subroutine validate_results
real*4 :: a(n), b(n)
do i = 1, N
- if (abs(a(i) - b(i)) > 0.0001) call abort
+ if (abs(a(i) - b(i)) > 0.0001) stop 1
end do
end subroutine validate_results
end module cublas
+! { dg-do run }
+!
program foo
IMPLICIT NONE
call bar (vol)
- if (vol .ne. 4) call abort
+ if (vol .ne. 4) stop 1
end program foo
subroutine bar(vol)
+! { dg-do run }
+!
program foo
IMPLICIT NONE
INTEGER :: vol = 0
call bar (vol)
- if (vol .ne. 2) call abort
+ if (vol .ne. 2) stop 1
end program foo
subroutine bar(vol)
enddo dokk
115 continue
!$acc end kernels
- if (any(a(1:3,1:3,1:3).ne.1)) call abort
+ if (any(a(1:3,1:3,1:3).ne.1)) stop 1
!$acc kernels
!$acc loop collapse(3)
enddo doll
120 end do dol
!$acc end kernels
- if (any(a(1:3,1:3,1:3).ne.2)) call abort
+ if (any(a(1:3,1:3,1:3).ne.2)) stop 2
end program collapse3
end do
end do
end do
- if (l .neqv. r) call abort
+ if (l .neqv. r) stop 1
do i = 2, 6
do j = -2, 4
do k = 13, 18
- if (a(i, j, k) .ne. b(i, j, k)) call abort
+ if (a(i, j, k) .ne. b(i, j, k)) stop 2
end do
end do
end do
!$acc end kernels
do i = 1, n
- if (c(i) .ne. a(i) + b(i)) call abort
+ if (c(i) .ne. a(i) + b(i)) stop 1
end do
end subroutine
!$acc end kernels
do i = 1, n
- if (a(i) .ne. b(i)) call abort
+ if (a(i) .ne. b(i)) stop 1
end do
call check (a, b, n)
integer :: i
do i = 1, n
- if (a(i) .ne. b(i)) call abort
+ if (a(i) .ne. b(i)) stop 2
end do
end subroutine check
!$acc end kernels
do i = 1, n
- if (a(i) .ne. b(i)) call abort
+ if (a(i) .ne. b(i)) stop 1
end do
call check (a, b, n)
integer :: i
do i = 1, n
- if (a(i) .ne. b(i)) call abort
+ if (a(i) .ne. b(i)) stop 2
end do
end subroutine check
!$acc exit data copyout (a(0:n-1), b(0:n-1), c(0:n-1))
do i = 0, n - 1
- if (c(i) .ne. a(i) + b(i)) call abort
+ if (c(i) .ne. a(i) + b(i)) stop 1
end do
end program main
!$acc end kernels
do i = 1, 32
- if (arr(i) .ne. i * 3) call abort
+ if (arr(i) .ne. i * 3) stop 1
end do
end program main
!$acc end kernels
do i = 0, 32 * 32 - 1
- if (arr(i) .ne. i + (i / 32) * 2) call abort
+ if (arr(i) .ne. i + (i / 32) * 2) stop 1
end do
end program main
!$acc end kernels
do i = 0, 32 * 32 - 1
- if (arr(i) .ne. i + (i / 32) * 2) call abort
+ if (arr(i) .ne. i + (i / 32) * 2) stop 1
end do
end program main
!$acc end kernels
do i = 0, 32 * 32 - 1
- if (arr(i) .ne. i + (i / 32) * 13) call abort
+ if (arr(i) .ne. i + (i / 32) * 13) stop 1
end do
end program main
do k = 0, 32 - 1
idx = i * 1024 + j * 32 + k
if (arr(idx) .ne. idx + ieor(i, j * 3) * k + ior(i, j * 5) * k) then
- call abort
+ stop 1
end if
end do
end do
do k = 0, 32 - 1
idx = i * 1024 + j * 32 + k
if (arr(idx) .ne. idx + ieor(i, j * 3) * k + ior(i, j * 5) * k) then
- call abort
+ stop 1
end if
end do
end do
!$acc end kernels
do i = 0, 32 * 32 - 1
- if (arr(i) .ne. i + ieor(i / 32, mod(i, 32) * 3)) call abort
+ if (arr(i) .ne. i + ieor(i / 32, mod(i, 32) * 3)) stop 1
end do
end program main
do j = 0, 32 -1
do k = 0, 32 - 1
idx = i * 1024 + j * 32 + k
- if (arr(idx) .ne. idx + ieor(i, j * 3) * k) call abort
+ if (arr(idx) .ne. idx + ieor(i, j * 3) * k) stop 1
end do
end do
end do
do k = 0, 32 - 1
idx = i * 1024 + j * 32 + k
if (arr(idx) .ne. idx + ieor(i, j * 3) * k + ior(i, j * 5) * k) then
- call abort
+ stop 1
end if
end do
end do
do k = 0, 32 - 1
idx = i * 1024 + j * 32 + k
if (arr(idx) .ne. idx + ieor(i, j * 3) * k + ior(i, j * 5) * k) then
- call abort
+ stop 1
end if
end do
end do
do k = 0, 32 - 1
idx = i * 1024 + j * 32 + k
if (arr(idx) .ne. idx + ieor(i, j * 3) * k + ior(i, j * 5) * k) then
- call abort
+ stop 1
end if
end do
end do
do k = 0, 32 - 1
idx = i * 1024 + j * 32 + k
if (arr(idx) .ne. idx + ieor(i, j * 3) * k + ior(i, j * 5) * k) then
- call abort
+ stop 1
end if
end do
end do
do k = 0, 32 - 1
idx = i * 1024 + j * 32 + k
if (arr(idx) .ne. idx + ieor(i, j * 3) * k + ior(i, j * 5) * k) then
- call abort
+ stop 1
end if
end do
end do
end do
!$acc end kernels
- if (red .ne. n) call abort
+ if (red .ne. n) stop 1
end program reduction
+! { dg-do run }
+!
use openacc
if (acc_get_num_devices (acc_device_host) .ne. 1) STOP 1
call acc_wait_async (0, 1)
! Test unseen async-argument.
- if (acc_async_test (2) .neqv. .TRUE.) call abort
+ if (acc_async_test (2) .neqv. .TRUE.) stop 1
call acc_wait_async (2, 1)
call acc_wait (1)
- if (acc_async_test (0) .neqv. .TRUE.) call abort
- if (acc_async_test (1) .neqv. .TRUE.) call abort
- if (acc_async_test (2) .neqv. .TRUE.) call abort
+ if (acc_async_test (0) .neqv. .TRUE.) stop 2
+ if (acc_async_test (1) .neqv. .TRUE.) stop 3
+ if (acc_async_test (2) .neqv. .TRUE.) stop 4
end program
call acc_wait (nprocs + 1)
- if (acc_async_test (1) .neqv. .TRUE.) call abort
- if (acc_async_test (2) .neqv. .TRUE.) call abort
- if (acc_async_test (nprocs + 1) .neqv. .TRUE.) call abort
+ if (acc_async_test (1) .neqv. .TRUE.) stop 1
+ if (acc_async_test (2) .neqv. .TRUE.) stop 2
+ if (acc_async_test (nprocs + 1) .neqv. .TRUE.) stop 3
end program
call acc_present_or_copyin (h)
- if (acc_is_present (h) .neqv. .TRUE.) call abort
+ if (acc_is_present (h) .neqv. .TRUE.) stop 1
call acc_copyout (h)
- if (acc_is_present (h) .neqv. .FALSE.) call abort
+ if (acc_is_present (h) .neqv. .FALSE.) stop 1
do i = 1, N
- if (h(i) /= i) call abort
+ if (h(i) /= i) stop 1
end do
do i = 1, N
call acc_pcopyin (h, sizeof (h))
- if (acc_is_present (h) .neqv. .TRUE.) call abort
+ if (acc_is_present (h) .neqv. .TRUE.) stop 1
call acc_copyout (h)
- if (acc_is_present (h) .neqv. .FALSE.) call abort
+ if (acc_is_present (h) .neqv. .FALSE.) stop 1
do i = 1, N
- if (h(i) /= i + i) call abort
+ if (h(i) /= i + i) stop 1
end do
call acc_create (h)
- if (acc_is_present (h) .neqv. .TRUE.) call abort
+ if (acc_is_present (h) .neqv. .TRUE.) stop 1
!$acc parallel loop
do i = 1, N
call acc_copyout (h)
- if (acc_is_present (h) .neqv. .FALSE.) call abort
+ if (acc_is_present (h) .neqv. .FALSE.) stop 1
do i = 1, N
- if (h(i) /= i) call abort
+ if (h(i) /= i) stop 1
end do
call acc_present_or_create (h, sizeof (h))
- if (acc_is_present (h) .neqv. .TRUE.) call abort
+ if (acc_is_present (h) .neqv. .TRUE.) stop 1
call acc_delete (h)
- if (acc_is_present (h) .neqv. .FALSE.) call abort
+ if (acc_is_present (h) .neqv. .FALSE.) stop 1
call acc_pcreate (h)
- if (acc_is_present (h) .neqv. .TRUE.) call abort
+ if (acc_is_present (h) .neqv. .TRUE.) stop 1
call acc_delete (h)
- if (acc_is_present (h) .neqv. .FALSE.) call abort
+ if (acc_is_present (h) .neqv. .FALSE.) stop 1
end program
call acc_update_device (h, sizeof (h))
- if (acc_is_present (h) .neqv. .TRUE.) call abort
+ if (acc_is_present (h) .neqv. .TRUE.) stop 1
h(:) = 0
call acc_copyout (h, sizeof (h))
do i = 1, N
- if (h(i) /= i + i) call abort
+ if (h(i) /= i + i) stop 2
end do
call acc_copyin (h, sizeof (h))
call acc_update_self (h, sizeof (h))
- if (acc_is_present (h) .neqv. .TRUE.) call abort
+ if (acc_is_present (h) .neqv. .TRUE.) stop 3
do i = 1, N
- if (h(i) /= i + i) call abort
+ if (h(i) /= i + i) stop 4
end do
call acc_delete (h)
- if (acc_is_present (h) .neqv. .FALSE.) call abort
+ if (acc_is_present (h) .neqv. .FALSE.) stop 4
end program
call acc_update_device_async (h, sizeof (h), async)
- if (acc_is_present (h) .neqv. .TRUE.) call abort
+ if (acc_is_present (h) .neqv. .TRUE.) stop 1
h(:) = 0
call acc_wait (async)
do i = 1, N
- if (h(i) /= i + i) call abort
+ if (h(i) /= i + i) stop 2
end do
call acc_copyin (h, sizeof (h))
call acc_update_self_async (h, sizeof (h), async)
- if (acc_is_present (h) .neqv. .TRUE.) call abort
+ if (acc_is_present (h) .neqv. .TRUE.) stop 3
do i = 1, N
- if (h(i) /= i + i) call abort
+ if (h(i) /= i + i) stop 4
end do
call acc_delete_async (h, async)
call acc_wait (async)
- if (acc_is_present (h) .neqv. .FALSE.) call abort
+ if (acc_is_present (h) .neqv. .FALSE.) stop 5
end program
call acc_update_device_async (h, sizeof (h), async)
- if (acc_is_present (h) .neqv. .TRUE.) call abort
+ if (acc_is_present (h) .neqv. .TRUE.) stop 1
h(:) = 0
call acc_wait (async)
do i = 1, N
- if (h(i) /= i + i) call abort
+ if (h(i) /= i + i) stop 2
end do
call acc_copyin (h, sizeof (h))
call acc_update_self_async (h, sizeof (h), async)
- if (acc_is_present (h) .neqv. .TRUE.) call abort
+ if (acc_is_present (h) .neqv. .TRUE.) stop 3
do i = 1, N
- if (h(i) /= i + i) call abort
+ if (h(i) /= i + i) stop 4
end do
call acc_delete_async (h, async)
call acc_wait (async)
- if (acc_is_present (h) .neqv. .FALSE.) call abort
+ if (acc_is_present (h) .neqv. .FALSE.) stop 5
end program
+! { dg-do run }
+!
USE OPENACC
IF (ACC_GET_NUM_DEVICES (ACC_DEVICE_HOST) .NE. 1) STOP 1
+! { dg-do run }
+!
INCLUDE "openacc_lib.h"
IF (ACC_GET_NUM_DEVICES (ACC_DEVICE_HOST) .NE. 1) STOP 1
+! { dg-do run }
+!
program map
integer, parameter :: n = 20, c = 10
integer :: i, a(n), b(n)
!$acc end parallel
do i = 1, n
- if (a(i) .ne. b(i)) call abort
+ if (a(i) .ne. b(i)) stop 1
end do
call check (a, b, n)
integer :: i
do i = 1, n
- if (a(i) .ne. b(i)) call abort
+ if (a(i) .ne. b(i)) stop 2
end do
end subroutine check
+! { dg-do run }
+!
! PR middle-end/63247
program test
+! { dg-do run }
+!
program foo
implicit none
integer, parameter :: n = 100
+! { dg-do run }
+!
program foo
implicit none
integer :: i
+! { dg-do run }
+!
MODULE reduction_test
CONTAINS
r=10.0
call param_reduction (r)
- if (r .ne. 1010) call abort ()
+ if (r .ne. 1010) stop 1
end program test
+! { dg-do run }
+!
program subarrays
integer, parameter :: n = 20, c = 10
integer :: i, a(n), b(n)
+! { dg-do run }
+!
program subarrays
integer, parameter :: n = 20, c = 10, low = 5, high = 10
integer :: i, a(n), b(n)
!$acc end parallel
do i = 1, N
- if (a(i) .ne. 0) call abort
+ if (a(i) .ne. 0) stop 1
end do
contains