Debian Codegraph @

gcc/testsuite/gfortran.dg/goacc/list.f95

raw
1 ! { dg-do compile }
2 ! { dg-additional-options "-fmax-errors=100" }
3
4 program test
5 implicit none
6
7 integer :: i, j, k, l, a(10)
8 common /b/ k
9 real, pointer :: p1 => NULL()
10 complex :: c, d(10)
11
12
13 !$acc parallel private(i)
14 !$acc end parallel
15
16 !$acc parallel private(a)
17 !$acc end parallel
18
19 !$acc parallel private(c, d)
20 !$acc end parallel
21
22 !$acc parallel private(i, j, k, l, a)
23 !$acc end parallel
24
25 !$acc parallel private (i) private (j)
26 !$acc end parallel
27
28 !$acc parallel private ! { dg-error "Failed to match clause" }
29
30 !$acc parallel private() ! { dg-error "Syntax error" }
31
32 !$acc parallel private(a(1:3)) ! { dg-error "Syntax error" }
33
34 !$acc parallel private(10) ! { dg-error "Syntax error" }
35
36 !$acc parallel private(/b/, /b/) ! { dg-error "present on multiple clauses" }
37 !$acc end parallel
38
39 !$acc parallel private(i, j, i) ! { dg-error "present on multiple clauses" }
40 !$acc end parallel
41
42 !$acc parallel private(p1)
43 !$acc end parallel
44
45 !$acc parallel firstprivate(i)
46 !$acc end parallel
47
48 !$acc parallel firstprivate(c, d)
49 !$acc end parallel
50
51 !$acc parallel firstprivate(a)
52 !$acc end parallel
53
54 !$acc parallel firstprivate(i, j, k, l, a)
55 !$acc end parallel
56
57 !$acc parallel firstprivate (i) firstprivate (j)
58 !$acc end parallel
59
60 !$acc parallel firstprivate ! { dg-error "Failed to match clause" }
61
62 !$acc parallel firstprivate() ! { dg-error "Syntax error" }
63
64 !$acc parallel firstprivate(a(1:3)) ! { dg-error "Syntax error" }
65
66 !$acc parallel firstprivate(10) ! { dg-error "Syntax error" }
67
68 !$acc parallel firstprivate (/b/, /b/) ! { dg-error "present on multiple clauses" }
69 !$acc end parallel
70
71 !$acc parallel firstprivate (i, j, i) ! { dg-error "present on multiple clauses" }
72 !$acc end parallel
73
74 !$acc parallel firstprivate(p1)
75 !$acc end parallel
76
77 !$acc parallel private (i) firstprivate (i) ! { dg-error "present on multiple clauses" }
78 !$acc end parallel
79
80
81 !$acc serial private(i)
82 !$acc end serial
83
84 !$acc serial private(a)
85 !$acc end serial
86
87 !$acc serial private(c, d)
88 !$acc end serial
89
90 !$acc serial private(i, j, k, l, a)
91 !$acc end serial
92
93 !$acc serial private (i) private (j)
94 !$acc end serial
95
96 !$acc serial private ! { dg-error "Failed to match clause" }
97
98 !$acc serial private() ! { dg-error "Syntax error" }
99
100 !$acc serial private(a(1:3)) ! { dg-error "Syntax error" }
101
102 !$acc serial private(10) ! { dg-error "Syntax error" }
103
104 !$acc serial private(/b/, /b/) ! { dg-error "present on multiple clauses" }
105 !$acc end serial
106
107 !$acc serial private(i, j, i) ! { dg-error "present on multiple clauses" }
108 !$acc end serial
109
110 !$acc serial private(p1)
111 !$acc end serial
112
113 !$acc serial firstprivate(i)
114 !$acc end serial
115
116 !$acc serial firstprivate(c, d)
117 !$acc end serial
118
119 !$acc serial firstprivate(a)
120 !$acc end serial
121
122 !$acc serial firstprivate(i, j, k, l, a)
123 !$acc end serial
124
125 !$acc serial firstprivate (i) firstprivate (j)
126 !$acc end serial
127
128 !$acc serial firstprivate ! { dg-error "Failed to match clause" }
129
130 !$acc serial firstprivate() ! { dg-error "Syntax error" }
131
132 !$acc serial firstprivate(a(1:3)) ! { dg-error "Syntax error" }
133
134 !$acc serial firstprivate(10) ! { dg-error "Syntax error" }
135
136 !$acc serial firstprivate (/b/, /b/) ! { dg-error "present on multiple clauses" }
137 !$acc end serial
138
139 !$acc serial firstprivate (i, j, i) ! { dg-error "present on multiple clauses" }
140 !$acc end serial
141
142 !$acc serial firstprivate(p1)
143 !$acc end serial
144
145 !$acc serial private (i) firstprivate (i) ! { dg-error "present on multiple clauses" }
146 !$acc end serial
147
148
149 !$acc host_data use_device(i) ! { dg-error "neither a POINTER nor an array" }
150 !$acc end host_data
151
152 !$acc host_data use_device(c, d) ! { dg-error "neither a POINTER nor an array" }
153 !$acc end host_data
154
155 !$acc host_data use_device(a)
156 !$acc end host_data
157
158 !$acc host_data use_device(i, j, k, l, a) ! { dg-error "neither a POINTER nor an array" }
159 !$acc end host_data
160
161 !$acc host_data use_device (i) use_device (j) ! { dg-error "neither a POINTER nor an array" }
162 !$acc end host_data
163
164 !$acc host_data use_device ! { dg-error "Failed to match clause" }
165
166 !$acc host_data use_device() ! { dg-error "Syntax error" }
167
168 !$acc host_data use_device(a(1:3)) ! { dg-error "Syntax error" }
169
170 !$acc host_data use_device(10) ! { dg-error "Syntax error" }
171
172 !$acc host_data use_device(/b/, /b/)
173 ! { dg-error "neither a POINTER nor an array" "" { target *-*-* } .-1 }
174 ! { dg-error "present on multiple clauses" "" { target *-*-* } .-2 }
175 !$acc end host_data
176
177 !$acc host_data use_device(i, j, i)
178 ! { dg-error "neither a POINTER nor an array" "" { target *-*-* } .-1 }
179 ! { dg-error "present on multiple clauses" "" { target *-*-* } .-2 }
180 !$acc end host_data
181
182 !$acc host_data use_device(p1)
183 !$acc end host_data
184
185 end program test