Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/pragma_cpp_predefs_3.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
3
4 #pragma GCC push_options
5 #pragma GCC target ("arch=armv8-a")
6
7 #ifdef __ARM_FEATURE_SVE
8 #error "__ARM_FEATURE_SVE is defined but should not be!"
9 #endif
10
11 #ifdef __ARM_FEATURE_SVE2
12 #error "__ARM_FEATURE_SVE2 is defined but should not be!"
13 #endif
14
15 #ifdef __ARM_FEATURE_SVE2_AES
16 #error "__ARM_FEATURE_SVE2_AES is defined but should not be!"
17 #endif
18
19 #ifdef __ARM_FEATURE_SVE2_BITPERM
20 #error "__ARM_FEATURE_SVE2_BITPERM is defined but should not be!"
21 #endif
22
23 #ifdef __ARM_FEATURE_SVE2_SHA3
24 #error "__ARM_FEATURE_SVE2_SHA3 is defined but should not be!"
25 #endif
26
27 #ifdef __ARM_FEATURE_SVE2_SM4
28 #error "__ARM_FEATURE_SVE2_SM4 is defined but should not be!"
29 #endif
30
31 #ifdef __ARM_FEATURE_SVE2p1
32 #error "__ARM_FEATURE_SVE2p1 is defined but should not be!"
33 #endif
34
35 #pragma GCC push_options
36 #pragma GCC target ("arch=armv8.2-a+sve")
37
38 #ifndef __ARM_FEATURE_SVE
39 #error "__ARM_FEATURE_SVE is not defined but should be!"
40 #endif
41
42 #ifdef __ARM_FEATURE_SVE2
43 #error "__ARM_FEATURE_SVE2 is defined but should not be!"
44 #endif
45
46 #ifdef __ARM_FEATURE_SVE2_AES
47 #error "__ARM_FEATURE_SVE2_AES is defined but should not be!"
48 #endif
49
50 #ifdef __ARM_FEATURE_SVE2_BITPERM
51 #error "__ARM_FEATURE_SVE2_BITPERM is defined but should not be!"
52 #endif
53
54 #ifdef __ARM_FEATURE_SVE2_SHA3
55 #error "__ARM_FEATURE_SVE2_SHA3 is defined but should not be!"
56 #endif
57
58 #ifdef __ARM_FEATURE_SVE2_SM4
59 #error "__ARM_FEATURE_SVE2_SM4 is defined but should not be!"
60 #endif
61
62 #ifdef __ARM_FEATURE_SVE2p1
63 #error "__ARM_FEATURE_SVE2p1 is defined but should not be!"
64 #endif
65
66 #pragma GCC pop_options
67
68 #pragma GCC push_options
69 #pragma GCC target ("arch=armv8.5-a+sve2")
70
71 #ifndef __ARM_FEATURE_SVE
72 #error "__ARM_FEATURE_SVE is not defined but should be!"
73 #endif
74
75 #ifndef __ARM_FEATURE_SVE2
76 #error "__ARM_FEATURE_SVE2 is not defined but should be!"
77 #endif
78
79 #ifdef __ARM_FEATURE_SVE2_AES
80 #error "__ARM_FEATURE_SVE2_AES is defined but should not be!"
81 #endif
82
83 #ifdef __ARM_FEATURE_SVE2_BITPERM
84 #error "__ARM_FEATURE_SVE2_BITPERM is defined but should not be!"
85 #endif
86
87 #ifdef __ARM_FEATURE_SVE2_SHA3
88 #error "__ARM_FEATURE_SVE2_SHA3 is defined but should not be!"
89 #endif
90
91 #ifdef __ARM_FEATURE_SVE2_SM4
92 #error "__ARM_FEATURE_SVE2_SM4 is defined but should not be!"
93 #endif
94
95 #ifdef __ARM_FEATURE_SVE2p1
96 #error "__ARM_FEATURE_SVE2p1 is defined but should not be!"
97 #endif
98
99 #pragma GCC pop_options
100
101 #pragma GCC push_options
102 #pragma GCC target ("arch=armv8.5-a+sve2-aes")
103
104 #ifndef __ARM_FEATURE_SVE
105 #error "__ARM_FEATURE_SVE is not defined but should be!"
106 #endif
107
108 #ifndef __ARM_FEATURE_SVE2
109 #error "__ARM_FEATURE_SVE2 is not defined but should be!"
110 #endif
111
112 #ifndef __ARM_FEATURE_AES
113 #error "__ARM_FEATURE_AES is not defined but should be!"
114 #endif
115
116 #ifndef __ARM_FEATURE_SVE2_AES
117 #error "__ARM_FEATURE_SVE2_AES is not defined but should be!"
118 #endif
119
120 #ifdef __ARM_FEATURE_SVE2_BITPERM
121 #error "__ARM_FEATURE_SVE2_BITPERM is defined but should not be!"
122 #endif
123
124 #ifdef __ARM_FEATURE_SVE2_SHA3
125 #error "__ARM_FEATURE_SVE2_SHA3 is defined but should not be!"
126 #endif
127
128 #ifdef __ARM_FEATURE_SVE2_SM4
129 #error "__ARM_FEATURE_SVE2_SM4 is defined but should not be!"
130 #endif
131
132 #pragma GCC pop_options
133
134 #pragma GCC push_options
135 #pragma GCC target ("arch=armv8.5-a+sve2-bitperm")
136
137 #ifndef __ARM_FEATURE_SVE
138 #error "__ARM_FEATURE_SVE is not defined but should be!"
139 #endif
140
141 #ifndef __ARM_FEATURE_SVE2
142 #error "__ARM_FEATURE_SVE2 is not defined but should be!"
143 #endif
144
145 #ifdef __ARM_FEATURE_SVE2_AES
146 #error "__ARM_FEATURE_SVE2_AES is defined but should not be!"
147 #endif
148
149 #ifndef __ARM_FEATURE_SVE2_BITPERM
150 #error "__ARM_FEATURE_SVE2_BITPERM is not defined but should be!"
151 #endif
152
153 #ifdef __ARM_FEATURE_SVE2_SHA3
154 #error "__ARM_FEATURE_SVE2_SHA3 is defined but should not be!"
155 #endif
156
157 #ifdef __ARM_FEATURE_SVE2_SM4
158 #error "__ARM_FEATURE_SVE2_SM4 is defined but should not be!"
159 #endif
160
161 #pragma GCC pop_options
162
163 #pragma GCC push_options
164 #pragma GCC target ("arch=armv8.5-a+sve2-sha3")
165
166 #ifndef __ARM_FEATURE_SVE
167 #error "__ARM_FEATURE_SVE is not defined but should be!"
168 #endif
169
170 #ifndef __ARM_FEATURE_SVE2
171 #error "__ARM_FEATURE_SVE2 is not defined but should be!"
172 #endif
173
174 #ifdef __ARM_FEATURE_SVE2_AES
175 #error "__ARM_FEATURE_SVE2_AES is defined but should not be!"
176 #endif
177
178 #ifdef __ARM_FEATURE_SVE2_BITPERM
179 #error "__ARM_FEATURE_SVE2_BITPERM is defined but should not be!"
180 #endif
181
182 #ifndef __ARM_FEATURE_SHA3
183 #error "__ARM_FEATURE_SHA3 is not defined but should be!"
184 #endif
185
186 #ifndef __ARM_FEATURE_SVE2_SHA3
187 #error "__ARM_FEATURE_SVE2_SHA3 is not defined but should be!"
188 #endif
189
190 #ifdef __ARM_FEATURE_SVE2_SM4
191 #error "__ARM_FEATURE_SVE2_SM4 is defined but should not be!"
192 #endif
193
194 #pragma GCC pop_options
195
196 #pragma GCC push_options
197 #pragma GCC target ("arch=armv8.5-a+sve2-sm4")
198
199 #ifndef __ARM_FEATURE_SVE
200 #error "__ARM_FEATURE_SVE is not defined but should be!"
201 #endif
202
203 #ifndef __ARM_FEATURE_SVE2
204 #error "__ARM_FEATURE_SVE2 is not defined but should be!"
205 #endif
206
207 #ifdef __ARM_FEATURE_SVE2_AES
208 #error "__ARM_FEATURE_SVE2_AES is defined but should not be!"
209 #endif
210
211 #ifdef __ARM_FEATURE_SVE2_BITPERM
212 #error "__ARM_FEATURE_SVE2_BITPERM is defined but should not be!"
213 #endif
214
215 #ifdef __ARM_FEATURE_SVE2_SHA3
216 #error "__ARM_FEATURE_SVE2_SHA3 is defined but should not be!"
217 #endif
218
219 #ifndef __ARM_FEATURE_SM4
220 #error "__ARM_FEATURE_SM4 is not defined but should be!"
221 #endif
222
223 #ifndef __ARM_FEATURE_SVE2_SM4
224 #error "__ARM_FEATURE_SVE2_SM4 is not defined but should be!"
225 #endif
226
227 #pragma GCC pop_options
228
229 /* Make sure that general-regs-only works too. */
230 #pragma GCC push_options
231 #pragma GCC target ("arch=armv8.5-a+sve2-aes+sve2-bitperm+sve2-sha3+sve2-sm4")
232
233 #ifndef __ARM_FEATURE_SVE
234 #error "__ARM_FEATURE_SVE is not defined but should be!"
235 #endif
236
237 #ifndef __ARM_FEATURE_SVE2
238 #error "__ARM_FEATURE_SVE2 is not defined but should be!"
239 #endif
240
241 #ifndef __ARM_FEATURE_SVE2_AES
242 #error "__ARM_FEATURE_SVE2_AES is not defined but should be!"
243 #endif
244
245 #ifndef __ARM_FEATURE_SVE2_BITPERM
246 #error "__ARM_FEATURE_SVE2_BITPERM is not defined but should be!"
247 #endif
248
249 #ifndef __ARM_FEATURE_SVE2_SHA3
250 #error "__ARM_FEATURE_SVE2_SHA3 is not defined but should be!"
251 #endif
252
253 #ifndef __ARM_FEATURE_SVE2_SM4
254 #error "__ARM_FEATURE_SVE2_SM4 is not defined but should be!"
255 #endif
256
257 #pragma GCC pop_options
258
259 #pragma GCC push_options
260 #pragma GCC target ("arch=armv9-a+sve2p1")
261
262 #ifndef __ARM_FEATURE_SVE
263 #error "__ARM_FEATURE_SVE is not defined but should be!"
264 #endif
265
266 #ifndef __ARM_FEATURE_SVE2
267 #error "__ARM_FEATURE_SVE2 is not defined but should be!"
268 #endif
269
270 #ifdef __ARM_FEATURE_SVE2_AES
271 #error "__ARM_FEATURE_SVE2_AES is defined but should not be!"
272 #endif
273
274 #ifdef __ARM_FEATURE_SVE2_BITPERM
275 #error "__ARM_FEATURE_SVE2_BITPERM is defined but should not be!"
276 #endif
277
278 #ifdef __ARM_FEATURE_SVE2_SHA3
279 #error "__ARM_FEATURE_SVE2_SHA3 is defined but should not be!"
280 #endif
281
282 #ifdef __ARM_FEATURE_SVE2_SM4
283 #error "__ARM_FEATURE_SVE2_SM4 is defined but should not be!"
284 #endif
285
286 #ifndef __ARM_FEATURE_SVE2p1
287 #error "__ARM_FEATURE_SVE2p1 is not defined but should be!"
288 #endif
289
290 #pragma GCC pop_options
291
292 #pragma GCC push_options
293 #pragma GCC target ("arch=armv9-a+sve2-aes+sve2-bitperm+sve2-sha3+sve2-sm4+sve2p1")
294
295 #ifndef __ARM_FEATURE_SVE
296 #error "__ARM_FEATURE_SVE is not defined but should be!"
297 #endif
298
299 #ifndef __ARM_FEATURE_SVE2
300 #error "__ARM_FEATURE_SVE2 is not defined but should be!"
301 #endif
302
303 #ifndef __ARM_FEATURE_SVE2_AES
304 #error "__ARM_FEATURE_SVE2_AES is not defined but should be!"
305 #endif
306
307 #ifndef __ARM_FEATURE_SVE2_BITPERM
308 #error "__ARM_FEATURE_SVE2_BITPERM is not defined but should be!"
309 #endif
310
311 #ifndef __ARM_FEATURE_SVE2_SHA3
312 #error "__ARM_FEATURE_SVE2_SHA3 is not defined but should be!"
313 #endif
314
315 #ifndef __ARM_FEATURE_SVE2_SM4
316 #error "__ARM_FEATURE_SVE2_SM4 is not defined but should be!"
317 #endif
318
319 #ifndef __ARM_FEATURE_SVE2p1
320 #error "__ARM_FEATURE_SVE2p1 is not defined but should be!"
321 #endif
322
323 #pragma GCC push_options
324 #pragma GCC target ("general-regs-only")
325
326 #ifdef __ARM_FEATURE_SVE
327 #error "__ARM_FEATURE_SVE is defined but should not be!"
328 #endif
329
330 #ifdef __ARM_FEATURE_SVE2
331 #error "__ARM_FEATURE_SVE2 is defined but should not be!"
332 #endif
333
334 #ifdef __ARM_FEATURE_SVE2_AES
335 #error "__ARM_FEATURE_SVE2_AES is defined but should not be!"
336 #endif
337
338 #ifdef __ARM_FEATURE_SVE2_BITPERM
339 #error "__ARM_FEATURE_SVE2_BITPERM is defined but should not be!"
340 #endif
341
342 #ifdef __ARM_FEATURE_SVE2_SHA3
343 #error "__ARM_FEATURE_SVE2_SHA3 is defined but should not be!"
344 #endif
345
346 #ifdef __ARM_FEATURE_SVE2_SM4
347 #error "__ARM_FEATURE_SVE2_SM4 is defined but should not be!"
348 #endif
349
350 #ifdef __ARM_FEATURE_SVE2p1
351 #error "__ARM_FEATURE_SVE2p1 is defined but should not be!"
352 #endif
353
354 #pragma GCC pop_options
355
356 #pragma GCC pop_options
357
358 #pragma GCC pop_options
359
360 int
361 foo (int a)
362 {
363 return a;
364 }