Debian Codegraph @

gcc/testsuite/gfortran.dg/gomp/declare-variant-6.f90

raw
1 module main
2 implicit none
3 contains
4 function f1 (x, y, z)
5 real (kind = 8) :: f1
6 integer, intent(in) :: x
7 integer (kind = 8), intent(in) :: y
8 real :: z
9
10 f1 = 0.0
11 end function
12
13 function f2 (x, y, z)
14 real (kind = 8) :: f2
15 integer, intent(in) :: x
16 integer (kind = 8), intent(in) :: y
17 real :: z
18
19 f2 = 0.0
20 end function
21
22 function f3 (x, y, z)
23 real (kind = 8) :: f3
24 integer, intent(in) :: x
25 integer (kind = 8), intent(in) :: y
26 real :: z
27 !$omp declare variant (f1) match (user={condition(.false.)},construct={parallel})
28 f3 = 0.0
29 end function
30
31 function f4 (x, y, z)
32 real (kind = 8) :: f4
33 integer, intent(in) :: x
34 integer (kind = 8), intent(in) :: y
35 real :: z
36 !$omp declare variant (f1) match (construct={parallel},user={condition(score(1):.true.)})
37 f4 = 0.0
38 end function
39
40 function f5 (x, y, z)
41 real (kind = 8) :: f5
42 integer, intent(in) :: x
43 integer (kind = 8), intent(in) :: y
44 real :: z
45 f5 = 0.0
46 end function
47
48 function f6 (x, y, z)
49 real (kind = 8) :: f6
50 integer, intent(in) :: x
51 integer (kind = 8), intent(in) :: y
52 real :: z
53 !$omp declare variant (f5) match (user={condition(.false.)}) ! { dg-error "'f5' used as a variant with incompatible 'construct' selector sets" }
54 f6 = 0.0
55 end function
56
57 function f7 (x, y, z)
58 real (kind = 8) :: f7
59 integer, intent(in) :: x
60 integer (kind = 8), intent(in) :: y
61 real :: z
62 !$omp declare variant (f5) match (construct={parallel},user={condition(score(1):.true.)})
63 f7 = 0.0
64 end function
65
66 function f8 (x, y, z)
67 real (kind = 8) :: f8
68 integer, intent(in) :: x
69 integer (kind = 8), intent(in) :: y
70 real :: z
71 f8 = 0.0
72 end function
73
74 function f9 (x, y, z)
75 real (kind = 8) :: f9
76 integer, intent(in) :: x
77 integer (kind = 8), intent(in) :: y
78 real :: z
79 !$omp declare variant (f8) match (user={condition(.false.)},construct={do}) ! { dg-error "'f8' used as a variant with incompatible 'construct' selector sets" }
80 f9 = 0.0
81 end function
82
83 function f10 (x, y, z)
84 real (kind = 8) :: f10
85 integer, intent(in) :: x
86 integer (kind = 8), intent(in) :: y
87 real :: z
88 !$omp declare variant (f8) match (user={condition(.true.)})
89 f10 = 0.0
90 end function
91
92 function f11 (x, y, z)
93 real (kind = 8) :: f11
94 integer, intent(in) :: x
95 integer (kind = 8), intent(in) :: y
96 real :: z
97 f11 = 0.0
98 end function
99
100 function f12 (x, y, z)
101 real (kind = 8) :: f12
102 integer, intent(in) :: x
103 integer (kind = 8), intent(in) :: y
104 real :: z
105 !$omp declare variant (f11) match (construct={target,teams,parallel,do}) ! { dg-error "'f11' used as a variant with incompatible 'construct' selector sets" }
106 f12 = 0.0
107 end function
108
109 function f13 (x, y, z)
110 real (kind = 8) :: f13
111 integer, intent(in) :: x
112 integer (kind = 8), intent(in) :: y
113 real :: z
114 !$omp declare variant (f11) match (user={condition(score(1):.true.)},construct={target,teams,parallel,do}) ! { dg-error "'f11' used as a variant with incompatible 'construct' selector sets" }
115 f13 = 0.0
116 end function
117
118 function f14 (x, y, z)
119 real (kind = 8) :: f14
120 integer, intent(in) :: x
121 integer (kind = 8), intent(in) :: y
122 real :: z
123 !$omp declare variant (f11) match (implementation={vendor(gnu)},construct={target,teams,parallel}) ! { dg-error "'f11' used as a variant with incompatible 'construct' selector sets" }
124 f14 = 0.0
125 end function
126
127 function f15 (x, y, z)
128 real (kind = 8) :: f15
129 integer, intent(in) :: x
130 integer (kind = 8), intent(in) :: y
131 real :: z
132 !$omp declare variant (f11) match (device={kind(any)},construct={teams,parallel})
133 f15 = 0.0
134 end function
135
136 function f16 (x, y, z)
137 real (kind = 8) :: f16
138 integer, intent(in) :: x
139 integer (kind = 8), intent(in) :: y
140 real :: z
141 f16 = 0.0
142 end function
143
144 function f17 (x, y, z)
145 real (kind = 8) :: f17
146 integer, intent(in) :: x
147 integer (kind = 8), intent(in) :: y
148 real :: z
149 !$omp declare variant (f16) match (construct={teams,parallel}) ! { dg-error "'f16' used as a variant with incompatible 'construct' selector sets" }
150 f17 = 0.0
151 end function
152
153 function f18 (x, y, z)
154 real (kind = 8) :: f18
155 integer, intent(in) :: x
156 integer (kind = 8), intent(in) :: y
157 real :: z
158 !$omp declare variant (f16) match(construct={teams,parallel,do})
159 f18 = 0.0
160 end function
161
162 function f19 (x, y, z)
163 real (kind = 8) :: f19
164 integer, intent(in) :: x
165 integer (kind = 8), intent(in) :: y
166 real :: z
167 f19 = 0.0
168 end function
169
170 function f20 (x, y, z)
171 real (kind = 8) :: f20
172 integer, intent(in) :: x
173 integer (kind = 8), intent(in) :: y
174 real :: z
175 !$omp declare variant (f19) match (construct={parallel}) ! { dg-error "'f19' used as a variant with incompatible 'construct' selector sets" }
176 f20 = 0.0
177 end function
178
179 function f21 (x, y, z)
180 real (kind = 8) :: f21
181 integer, intent(in) :: x
182 integer (kind = 8), intent(in) :: y
183 real :: z
184 !$omp declare variant (f19) match (construct={do},implementation={vendor(gnu,llvm)})
185 f21 = 0.0
186 end function
187
188 end module