aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/goacc/pure-elemental-procedures-2.f90
blob: 31233b35fa70f9f2b258b67db46fa01a918c2ed1 (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
43
44
45
46
47
48
49
50
51
pure elemental subroutine foo()
!$acc routine vector  ! { dg-error "ROUTINE with GANG, WORKER, or VECTOR clause is not permitted in PURE procedure" }
end

pure elemental subroutine foo_nh()
!$acc routine nohost vector  ! { dg-error "ROUTINE with GANG, WORKER, or VECTOR clause is not permitted in PURE procedure" }
end

elemental subroutine foo2()
!$acc routine (myfoo2) gang  ! { dg-error "Invalid NAME 'myfoo2' in" }
end

elemental subroutine foo2a()
!$acc routine gang  ! { dg-error "ROUTINE with GANG, WORKER, or VECTOR clause is not permitted in PURE procedure" }
end

elemental subroutine foo2a_nh()
!$acc routine nohost gang  ! { dg-error "ROUTINE with GANG, WORKER, or VECTOR clause is not permitted in PURE procedure" }
end

pure subroutine foo3()
!$acc routine vector ! { dg-error "ROUTINE with GANG, WORKER, or VECTOR clause is not permitted in PURE procedure" }
end

pure subroutine foo3_nh()
!$acc routine nohost vector ! { dg-error "ROUTINE with GANG, WORKER, or VECTOR clause is not permitted in PURE procedure" }
end

elemental impure subroutine foo4()
!$acc routine vector ! OK: impure
end

elemental impure subroutine foo4_nh()
!$acc routine nohost vector ! OK: impure
end

pure subroutine foo5()
!$acc routine seq ! OK: seq
end

pure subroutine foo5_nh()
!$acc routine nohost seq ! OK: seq
end

pure subroutine foo6()
!$acc routine ! OK (implied 'seq')
end

pure subroutine foo6_nh()
!$acc routine nohost ! OK (implied 'seq')
end