blob: a5f3840f63c4c36af90a4cd4f8b5adcec95b2524 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
! This test checks if the runtime can properly handle implicit
! firstprivate varaibles inside subroutines in modules.
! { dg-do run }
module test_mod
contains
subroutine test(x)
IMPLICIT NONE
INTEGER :: x, y, j
x = 5
!$ACC PARALLEL LOOP copyout (y)
DO j=1,10
y=x
ENDDO
!$ACC END PARALLEL LOOP
y = -1;
!$ACC PARALLEL LOOP firstprivate (y) copyout (x)
DO j=1,10
x=y
ENDDO
!$ACC END PARALLEL LOOP
end subroutine test
end module test_mod
program t
use test_mod
INTEGER :: x_min
x_min = 8
CALL test(x_min)
if (x_min .ne. -1) call abort
end program t
|