[clang-format] Improve brace wrapping and add an option to control indentation of...
[llvm-project.git] / flang / test / Semantics / OpenACC / acc-module.f90
blob7f034d8ae54f0ac332abd32a861e79eb44b35fd5
1 ! RUN: %python %S/../test_modfile.py %s %flang_fc1 -fopenacc
3 module acc_mod
4 real :: data_create(100)
5 !$acc declare create(data_create)
7 real :: data_copyin(10)
8 !$acc declare copyin(data_copyin)
10 real :: data_copyinro(10)
11 !$acc declare copyin(readonly: data_copyinro)
13 real :: data_device_resident(20)
14 !$acc declare device_resident(data_device_resident)
16 integer :: data_link(50)
17 !$acc declare link(data_link)
19 !$acc routine(sub10) seq
21 contains
22 subroutine sub1()
23 !$acc routine
24 end subroutine
26 subroutine sub2()
27 !$acc routine seq
28 end subroutine
30 subroutine sub3()
31 !$acc routine gang
32 end subroutine
34 subroutine sub4()
35 !$acc routine vector
36 end subroutine
38 subroutine sub5()
39 !$acc routine worker
40 end subroutine
42 subroutine sub6()
43 !$acc routine gang(dim:2)
44 end subroutine
46 subroutine sub7()
47 !$acc routine bind("sub7_")
48 end subroutine
50 subroutine sub8()
51 !$acc routine bind(sub7)
52 end subroutine
54 subroutine sub9()
55 !$acc routine vector
56 !$acc routine seq bind(sub7)
57 !$acc routine gang bind(sub8)
58 end subroutine
60 subroutine sub10()
61 end subroutine
63 subroutine sub11()
64 !$acc routine device_type(nvidia) gang device_type(*) seq
65 end subroutine
67 subroutine sub12()
68 !$acc routine device_type(host) bind(sub7) device_type(multicore) bind(sub8)
69 end subroutine
70 end module
72 !Expect: acc_mod.mod
73 ! module acc_mod
74 ! real(4)::data_create(1_8:100_8)
75 ! !$acc declare create(data_create)
76 ! real(4)::data_copyin(1_8:10_8)
77 ! !$acc declare copyin(data_copyin)
78 ! real(4)::data_copyinro(1_8:10_8)
79 ! !$acc declare copyin(readonly: data_copyinro)
80 ! real(4)::data_device_resident(1_8:20_8)
81 ! !$acc declare device_resident(data_device_resident)
82 ! integer(4)::data_link(1_8:50_8)
83 ! !$acc declare link(data_link)
84 ! contains
85 ! subroutine sub1()
86 ! !$acc routine
87 ! end
88 ! subroutine sub2()
89 ! !$acc routine seq
90 ! end
91 ! subroutine sub3()
92 ! !$acc routine gang
93 ! end
94 ! subroutine sub4()
95 ! !$acc routine vector
96 ! end
97 ! subroutine sub5()
98 ! !$acc routine worker
99 ! end
100 ! subroutine sub6()
101 ! !$acc routine gang(dim:2)
102 ! end
103 ! subroutine sub7()
104 ! !$acc routine bind("sub7_")
105 ! end
106 ! subroutine sub8()
107 ! !$acc routine bind(sub7)
108 ! end
109 ! subroutine sub9()
110 ! !$acc routine vector
111 ! !$acc routine seq bind(sub7)
112 ! !$acc routine gang bind(sub8)
113 ! end
114 ! subroutine sub10()
115 ! !$acc routine seq
116 ! end
117 ! subroutinesub11()
118 ! !$acc routine device_type(nvidia) gang device_type(*) seq
119 ! end
120 ! subroutinesub12()
121 ! !$acc routine device_type(host) bind(sub7) device_type(multicore) bind(sub8)
122 ! end
123 ! end