Debian Codegraph @

gcc/testsuite/gfortran.dg/goacc/specification-part.f90

raw
1 ! { dg-do compile }
2 !
3 ! PR fortran/90111
4 !
5 ! Check that OpenACC directives in everywhere in specification part,
6 ! i.e. it may appear before/after the use, import, implicit, and declaration
7 !
8
9 module m
10 end module m
11
12 subroutine foo0(kk)
13 use m
14 implicit none
15 integer :: jj, kk
16 !$acc routine
17 end
18
19 subroutine foo1()
20 use m
21 implicit none
22 !$acc routine
23 integer :: jj
24 end
25
26 subroutine foo2()
27 use m
28 !$acc routine
29 implicit none
30 end
31
32 subroutine foo3()
33 !$acc routine
34 use m
35 implicit none
36 end
37
38 module m2
39 interface
40 subroutine foo0(kk)
41 use m
42 import
43 implicit none
44 integer :: kk
45 !$acc routine
46 end
47 subroutine foo1()
48 use m
49 import
50 implicit none
51 !$acc routine
52 end
53 subroutine foo2()
54 use m
55 import
56 !$acc routine
57 implicit none
58 end
59 subroutine foo3()
60 use m
61 !$acc routine
62 import
63 implicit none
64 end
65 subroutine foo4()
66 use m
67 !$acc routine
68 import
69 implicit none
70 end
71 end interface
72 end module m2
73
74 subroutine bar0()
75 use m
76 implicit none
77 integer :: ii
78 !$acc declare copyin(ii)
79 end
80
81 subroutine bar1()
82 use m
83 implicit none
84 !$acc declare copyin(ii)
85 integer :: ii
86 end
87
88 subroutine bar2()
89 use m
90 !$acc declare copyin(ii)
91 implicit none
92 integer :: ii
93 end
94
95 subroutine bar3()
96 !$acc declare copyin(ii)
97 use m
98 implicit none
99 integer :: ii
100 end