30 lines
396 B
Fortran
Raw Normal View History

2019-05-23 17:36:43 -04:00
! { dg-do run }
2018-03-19 15:31:14 -05:00
module vars
implicit none
real b
!$acc declare create (b)
end module vars
program test
use vars
use openacc
implicit none
real a
2019-05-23 17:36:43 -04:00
if (acc_is_present (b) .neqv. .true.) STOP 1
2018-03-19 15:31:14 -05:00
a = 2.0
!$acc parallel copy (a)
b = a
a = 1.0
a = a + b
!$acc end parallel
2019-05-23 17:36:43 -04:00
if (acc_is_present (b) .neqv. .true.) STOP 2
2018-03-19 15:31:14 -05:00
2019-05-23 17:36:43 -04:00
if (a .ne. 3.0) STOP 3
2018-03-19 15:31:14 -05:00
end program test