2 /* { dg-options "-std=c11" } */
5 leading_zeros (unsigned char a
, unsigned short b
, unsigned int c
,
6 unsigned long d
, unsigned long long e
)
8 return (__builtin_stdc_leading_zeros (a
)
9 + __builtin_stdc_leading_zeros (b
)
10 + __builtin_stdc_leading_zeros (c
)
11 + __builtin_stdc_leading_zeros (d
)
12 + __builtin_stdc_leading_zeros (e
));
16 leading_ones (unsigned char a
, unsigned short b
, unsigned int c
,
17 unsigned long d
, unsigned long long e
)
19 return (__builtin_stdc_leading_ones (a
)
20 + __builtin_stdc_leading_ones (b
)
21 + __builtin_stdc_leading_ones (c
)
22 + __builtin_stdc_leading_ones (d
)
23 + __builtin_stdc_leading_ones (e
));
27 trailing_zeros (unsigned char a
, unsigned short b
, unsigned int c
,
28 unsigned long d
, unsigned long long e
)
30 return (__builtin_stdc_trailing_zeros (a
)
31 + __builtin_stdc_trailing_zeros (b
)
32 + __builtin_stdc_trailing_zeros (c
)
33 + __builtin_stdc_trailing_zeros (d
)
34 + __builtin_stdc_trailing_zeros (e
));
38 trailing_ones (unsigned char a
, unsigned short b
, unsigned int c
,
39 unsigned long d
, unsigned long long e
)
41 return (__builtin_stdc_trailing_ones (a
)
42 + __builtin_stdc_trailing_ones (b
)
43 + __builtin_stdc_trailing_ones (c
)
44 + __builtin_stdc_trailing_ones (d
)
45 + __builtin_stdc_trailing_ones (e
));
49 first_leading_zero (unsigned char a
, unsigned short b
, unsigned int c
,
50 unsigned long d
, unsigned long long e
)
52 return (__builtin_stdc_first_leading_zero (a
)
53 + __builtin_stdc_first_leading_zero (b
)
54 + __builtin_stdc_first_leading_zero (c
)
55 + __builtin_stdc_first_leading_zero (d
)
56 + __builtin_stdc_first_leading_zero (e
));
60 first_leading_one (unsigned char a
, unsigned short b
, unsigned int c
,
61 unsigned long d
, unsigned long long e
)
63 return (__builtin_stdc_first_leading_one (a
)
64 + __builtin_stdc_first_leading_one (b
)
65 + __builtin_stdc_first_leading_one (c
)
66 + __builtin_stdc_first_leading_one (d
)
67 + __builtin_stdc_first_leading_one (e
));
71 first_trailing_zero (unsigned char a
, unsigned short b
, unsigned int c
,
72 unsigned long d
, unsigned long long e
)
74 return (__builtin_stdc_first_trailing_zero (a
)
75 + __builtin_stdc_first_trailing_zero (b
)
76 + __builtin_stdc_first_trailing_zero (c
)
77 + __builtin_stdc_first_trailing_zero (d
)
78 + __builtin_stdc_first_trailing_zero (e
));
82 first_trailing_one (unsigned char a
, unsigned short b
, unsigned int c
,
83 unsigned long d
, unsigned long long e
)
85 return (__builtin_stdc_first_trailing_one (a
)
86 + __builtin_stdc_first_trailing_one (b
)
87 + __builtin_stdc_first_trailing_one (c
)
88 + __builtin_stdc_first_trailing_one (d
)
89 + __builtin_stdc_first_trailing_one (e
));
93 count_zeros (unsigned char a
, unsigned short b
, unsigned int c
,
94 unsigned long d
, unsigned long long e
)
96 return (__builtin_stdc_count_zeros (a
)
97 + __builtin_stdc_count_zeros (b
)
98 + __builtin_stdc_count_zeros (c
)
99 + __builtin_stdc_count_zeros (d
)
100 + __builtin_stdc_count_zeros (e
));
104 count_ones (unsigned char a
, unsigned short b
, unsigned int c
,
105 unsigned long d
, unsigned long long e
)
107 return (__builtin_stdc_count_ones (a
)
108 + __builtin_stdc_count_ones (b
)
109 + __builtin_stdc_count_ones (c
)
110 + __builtin_stdc_count_ones (d
)
111 + __builtin_stdc_count_ones (e
));
115 has_single_bit (unsigned char a
, unsigned short b
, unsigned int c
,
116 unsigned long d
, unsigned long long e
)
118 return (__builtin_stdc_has_single_bit (a
)
119 || __builtin_stdc_has_single_bit (b
)
120 || __builtin_stdc_has_single_bit (c
)
121 || __builtin_stdc_has_single_bit (d
)
122 || __builtin_stdc_has_single_bit (e
));
126 bit_width (unsigned char a
, unsigned short b
, unsigned int c
,
127 unsigned long d
, unsigned long long e
)
129 return (__builtin_stdc_bit_width (a
)
130 + __builtin_stdc_bit_width (b
)
131 + __builtin_stdc_bit_width (c
)
132 + __builtin_stdc_bit_width (d
)
133 + __builtin_stdc_bit_width (e
));
137 bit_floor (unsigned char a
, unsigned short b
, unsigned int c
,
138 unsigned long d
, unsigned long long e
)
140 return (__builtin_stdc_bit_floor (a
)
141 + __builtin_stdc_bit_floor (b
)
142 + __builtin_stdc_bit_floor (c
)
143 + __builtin_stdc_bit_floor (d
)
144 + __builtin_stdc_bit_floor (e
));
148 bit_ceil (unsigned char a
, unsigned short b
, unsigned int c
,
149 unsigned long d
, unsigned long long e
)
151 return (__builtin_stdc_bit_ceil (a
)
152 + __builtin_stdc_bit_ceil (b
)
153 + __builtin_stdc_bit_ceil (c
)
154 + __builtin_stdc_bit_ceil (d
)
155 + __builtin_stdc_bit_ceil (e
));
158 #define expr_has_type(e, t) _Generic (e, default : 0, t : 1)
163 if (__builtin_stdc_leading_zeros ((unsigned char) 0) != __CHAR_BIT__
164 || !expr_has_type (__builtin_stdc_leading_zeros ((unsigned char) 0), unsigned int)
165 || __builtin_stdc_leading_zeros ((unsigned short) 0) != __SIZEOF_SHORT__
* __CHAR_BIT__
166 || !expr_has_type (__builtin_stdc_leading_zeros ((unsigned short) 0), unsigned int)
167 || __builtin_stdc_leading_zeros (0U) != __SIZEOF_INT__
* __CHAR_BIT__
168 || !expr_has_type (__builtin_stdc_leading_zeros (0U), unsigned int)
169 || __builtin_stdc_leading_zeros (0UL) != __SIZEOF_LONG__
* __CHAR_BIT__
170 || !expr_has_type (__builtin_stdc_leading_zeros (0UL), unsigned int)
171 || __builtin_stdc_leading_zeros (0ULL) != __SIZEOF_LONG_LONG__
* __CHAR_BIT__
172 || !expr_has_type (__builtin_stdc_leading_zeros (0ULL), unsigned int))
174 if (__builtin_stdc_leading_zeros ((unsigned char) ~0U) != 0
175 || __builtin_stdc_leading_zeros ((unsigned short) ~0U) != 0
176 || __builtin_stdc_leading_zeros (~0U) != 0
177 || __builtin_stdc_leading_zeros (~0UL) != 0
178 || __builtin_stdc_leading_zeros (~0ULL) != 0)
180 if (__builtin_stdc_leading_zeros ((unsigned char) 3) != __CHAR_BIT__
- 2
181 || __builtin_stdc_leading_zeros ((unsigned short) 9) != __SIZEOF_SHORT__
* __CHAR_BIT__
- 4
182 || __builtin_stdc_leading_zeros (34U) != __SIZEOF_INT__
* __CHAR_BIT__
- 6
183 || __builtin_stdc_leading_zeros (130UL) != __SIZEOF_LONG__
* __CHAR_BIT__
- 8
184 || __builtin_stdc_leading_zeros (512ULL) != __SIZEOF_LONG_LONG__
* __CHAR_BIT__
- 10)
186 if (__builtin_stdc_leading_ones ((unsigned char) 0) != 0
187 || !expr_has_type (__builtin_stdc_leading_ones ((unsigned char) 0), unsigned int)
188 || __builtin_stdc_leading_ones ((unsigned short) 0) != 0
189 || !expr_has_type (__builtin_stdc_leading_ones ((unsigned short) 0), unsigned int)
190 || __builtin_stdc_leading_ones (0U) != 0
191 || !expr_has_type (__builtin_stdc_leading_ones (0U), unsigned int)
192 || __builtin_stdc_leading_ones (0UL) != 0
193 || !expr_has_type (__builtin_stdc_leading_ones (0UL), unsigned int)
194 || __builtin_stdc_leading_ones (0ULL) != 0
195 || !expr_has_type (__builtin_stdc_leading_ones (0ULL), unsigned int))
197 if (__builtin_stdc_leading_ones ((unsigned char) ~0U) != __CHAR_BIT__
198 || __builtin_stdc_leading_ones ((unsigned short) ~0U) != __SIZEOF_SHORT__
* __CHAR_BIT__
199 || __builtin_stdc_leading_ones (~0U) != __SIZEOF_INT__
* __CHAR_BIT__
200 || __builtin_stdc_leading_ones (~0UL) != __SIZEOF_LONG__
* __CHAR_BIT__
201 || __builtin_stdc_leading_ones (~0ULL) != __SIZEOF_LONG_LONG__
* __CHAR_BIT__
)
203 if (__builtin_stdc_leading_ones ((unsigned char) ~3) != __CHAR_BIT__
- 2
204 || __builtin_stdc_leading_ones ((unsigned short) ~9) != __SIZEOF_SHORT__
* __CHAR_BIT__
- 4
205 || __builtin_stdc_leading_ones (~34U) != __SIZEOF_INT__
* __CHAR_BIT__
- 6
206 || __builtin_stdc_leading_ones (~130UL) != __SIZEOF_LONG__
* __CHAR_BIT__
- 8
207 || __builtin_stdc_leading_ones (~512ULL) != __SIZEOF_LONG_LONG__
* __CHAR_BIT__
- 10)
209 if (__builtin_stdc_trailing_zeros ((unsigned char) 0) != __CHAR_BIT__
210 || !expr_has_type (__builtin_stdc_trailing_zeros ((unsigned char) 0), unsigned int)
211 || __builtin_stdc_trailing_zeros ((unsigned short) 0) != __SIZEOF_SHORT__
* __CHAR_BIT__
212 || !expr_has_type (__builtin_stdc_trailing_zeros ((unsigned short) 0), unsigned int)
213 || __builtin_stdc_trailing_zeros (0U) != __SIZEOF_INT__
* __CHAR_BIT__
214 || !expr_has_type (__builtin_stdc_trailing_zeros (0U), unsigned int)
215 || __builtin_stdc_trailing_zeros (0UL) != __SIZEOF_LONG__
* __CHAR_BIT__
216 || !expr_has_type (__builtin_stdc_trailing_zeros (0UL), unsigned int)
217 || __builtin_stdc_trailing_zeros (0ULL) != __SIZEOF_LONG_LONG__
* __CHAR_BIT__
218 || !expr_has_type (__builtin_stdc_trailing_zeros (0ULL), unsigned int))
220 if (__builtin_stdc_trailing_zeros ((unsigned char) ~0U) != 0
221 || __builtin_stdc_trailing_zeros ((unsigned short) ~0U) != 0
222 || __builtin_stdc_trailing_zeros (~0U) != 0
223 || __builtin_stdc_trailing_zeros (~0UL) != 0
224 || __builtin_stdc_trailing_zeros (~0ULL) != 0)
226 if (__builtin_stdc_trailing_zeros ((unsigned char) 2) != 1
227 || __builtin_stdc_trailing_zeros ((unsigned short) 24) != 3
228 || __builtin_stdc_trailing_zeros (32U) != 5
229 || __builtin_stdc_trailing_zeros (128UL) != 7
230 || __builtin_stdc_trailing_zeros (512ULL) != 9)
232 if (__builtin_stdc_trailing_ones ((unsigned char) 0) != 0
233 || !expr_has_type (__builtin_stdc_trailing_ones ((unsigned char) 0), unsigned int)
234 || __builtin_stdc_trailing_ones ((unsigned short) 0) != 0
235 || !expr_has_type (__builtin_stdc_trailing_ones ((unsigned short) 0), unsigned int)
236 || __builtin_stdc_trailing_ones (0U) != 0
237 || !expr_has_type (__builtin_stdc_trailing_ones (0U), unsigned int)
238 || __builtin_stdc_trailing_ones (0UL) != 0
239 || !expr_has_type (__builtin_stdc_trailing_ones (0UL), unsigned int)
240 || __builtin_stdc_trailing_ones (0ULL) != 0
241 || !expr_has_type (__builtin_stdc_trailing_ones (0ULL), unsigned int))
243 if (__builtin_stdc_trailing_ones ((unsigned char) ~0U) != __CHAR_BIT__
244 || __builtin_stdc_trailing_ones ((unsigned short) ~0U) != __SIZEOF_SHORT__
* __CHAR_BIT__
245 || __builtin_stdc_trailing_ones (~0U) != __SIZEOF_INT__
* __CHAR_BIT__
246 || __builtin_stdc_trailing_ones (~0UL) != __SIZEOF_LONG__
* __CHAR_BIT__
247 || __builtin_stdc_trailing_ones (~0ULL) != __SIZEOF_LONG_LONG__
* __CHAR_BIT__
)
249 if (__builtin_stdc_trailing_ones ((unsigned char) 5) != 1
250 || __builtin_stdc_trailing_ones ((unsigned short) 15) != 4
251 || __builtin_stdc_trailing_ones (127U) != 7
252 || __builtin_stdc_trailing_ones (511UL) != 9
253 || __builtin_stdc_trailing_ones (~0ULL >> 2) != __SIZEOF_LONG_LONG__
* __CHAR_BIT__
- 2)
255 if (__builtin_stdc_first_leading_zero ((unsigned char) 0) != 1
256 || !expr_has_type (__builtin_stdc_first_leading_zero ((unsigned char) 0), unsigned int)
257 || __builtin_stdc_first_leading_zero ((unsigned short) 0) != 1
258 || !expr_has_type (__builtin_stdc_first_leading_zero ((unsigned short) 0), unsigned int)
259 || __builtin_stdc_first_leading_zero (0U) != 1
260 || !expr_has_type (__builtin_stdc_first_leading_zero (0U), unsigned int)
261 || __builtin_stdc_first_leading_zero (0UL) != 1
262 || !expr_has_type (__builtin_stdc_first_leading_zero (0UL), unsigned int)
263 || __builtin_stdc_first_leading_zero (0ULL) != 1
264 || !expr_has_type (__builtin_stdc_first_leading_zero (0ULL), unsigned int))
266 if (__builtin_stdc_first_leading_zero ((unsigned char) ~0U) != 0
267 || __builtin_stdc_first_leading_zero ((unsigned short) ~0U) != 0
268 || __builtin_stdc_first_leading_zero (~0U) != 0
269 || __builtin_stdc_first_leading_zero (~0UL) != 0
270 || __builtin_stdc_first_leading_zero (~0ULL) != 0)
272 if (__builtin_stdc_first_leading_zero ((unsigned char) ~3U) != __CHAR_BIT__
- 1
273 || __builtin_stdc_first_leading_zero ((unsigned short) ~15U) != __SIZEOF_SHORT__
* __CHAR_BIT__
- 3
274 || __builtin_stdc_first_leading_zero (~63U) != __SIZEOF_INT__
* __CHAR_BIT__
- 5
275 || __builtin_stdc_first_leading_zero (~255UL) != __SIZEOF_LONG__
* __CHAR_BIT__
- 7
276 || __builtin_stdc_first_leading_zero (~1023ULL) != __SIZEOF_LONG_LONG__
* __CHAR_BIT__
- 9)
278 if (__builtin_stdc_first_leading_one ((unsigned char) 0) != 0
279 || !expr_has_type (__builtin_stdc_first_leading_one ((unsigned char) 0), unsigned int)
280 || __builtin_stdc_first_leading_one ((unsigned short) 0) != 0
281 || !expr_has_type (__builtin_stdc_first_leading_one ((unsigned short) 0), unsigned int)
282 || __builtin_stdc_first_leading_one (0U) != 0
283 || !expr_has_type (__builtin_stdc_first_leading_one (0U), unsigned int)
284 || __builtin_stdc_first_leading_one (0UL) != 0
285 || !expr_has_type (__builtin_stdc_first_leading_one (0UL), unsigned int)
286 || __builtin_stdc_first_leading_one (0ULL) != 0
287 || !expr_has_type (__builtin_stdc_first_leading_one (0ULL), unsigned int))
289 if (__builtin_stdc_first_leading_one ((unsigned char) ~0U) != 1
290 || __builtin_stdc_first_leading_one ((unsigned short) ~0U) != 1
291 || __builtin_stdc_first_leading_one (~0U) != 1
292 || __builtin_stdc_first_leading_one (~0UL) != 1
293 || __builtin_stdc_first_leading_one (~0ULL) != 1)
295 if (__builtin_stdc_first_leading_one ((unsigned char) 3) != __CHAR_BIT__
- 1
296 || __builtin_stdc_first_leading_one ((unsigned short) 9) != __SIZEOF_SHORT__
* __CHAR_BIT__
- 3
297 || __builtin_stdc_first_leading_one (34U) != __SIZEOF_INT__
* __CHAR_BIT__
- 5
298 || __builtin_stdc_first_leading_one (130UL) != __SIZEOF_LONG__
* __CHAR_BIT__
- 7
299 || __builtin_stdc_first_leading_one (512ULL) != __SIZEOF_LONG_LONG__
* __CHAR_BIT__
- 9)
301 if (__builtin_stdc_first_trailing_zero ((unsigned char) 0) != 1
302 || !expr_has_type (__builtin_stdc_first_trailing_zero ((unsigned char) 0), unsigned int)
303 || __builtin_stdc_first_trailing_zero ((unsigned short) 0) != 1
304 || !expr_has_type (__builtin_stdc_first_trailing_zero ((unsigned short) 0), unsigned int)
305 || __builtin_stdc_first_trailing_zero (0U) != 1
306 || !expr_has_type (__builtin_stdc_first_trailing_zero (0U), unsigned int)
307 || __builtin_stdc_first_trailing_zero (0UL) != 1
308 || !expr_has_type (__builtin_stdc_first_trailing_zero (0UL), unsigned int)
309 || __builtin_stdc_first_trailing_zero (0ULL) != 1
310 || !expr_has_type (__builtin_stdc_first_trailing_zero (0ULL), unsigned int))
312 if (__builtin_stdc_first_trailing_zero ((unsigned char) ~0U) != 0
313 || __builtin_stdc_first_trailing_zero ((unsigned short) ~0U) != 0
314 || __builtin_stdc_first_trailing_zero (~0U) != 0
315 || __builtin_stdc_first_trailing_zero (~0UL) != 0
316 || __builtin_stdc_first_trailing_zero (~0ULL) != 0)
318 if (__builtin_stdc_first_trailing_zero ((unsigned char) 2) != 1
319 || __builtin_stdc_first_trailing_zero ((unsigned short) 15) != 5
320 || __builtin_stdc_first_trailing_zero (63U) != 7
321 || __builtin_stdc_first_trailing_zero (128UL) != 1
322 || __builtin_stdc_first_trailing_zero (511ULL) != 10)
324 if (__builtin_stdc_first_trailing_one ((unsigned char) 0) != 0
325 || !expr_has_type (__builtin_stdc_first_trailing_one ((unsigned char) 0), unsigned int)
326 || __builtin_stdc_first_trailing_one ((unsigned short) 0) != 0
327 || !expr_has_type (__builtin_stdc_first_trailing_one ((unsigned short) 0), unsigned int)
328 || __builtin_stdc_first_trailing_one (0U) != 0
329 || !expr_has_type (__builtin_stdc_first_trailing_one (0U), unsigned int)
330 || __builtin_stdc_first_trailing_one (0UL) != 0
331 || !expr_has_type (__builtin_stdc_first_trailing_one (0UL), unsigned int)
332 || __builtin_stdc_first_trailing_one (0ULL) != 0
333 || !expr_has_type (__builtin_stdc_first_trailing_one (0ULL), unsigned int))
335 if (__builtin_stdc_first_trailing_one ((unsigned char) ~0U) != 1
336 || __builtin_stdc_first_trailing_one ((unsigned short) ~0U) != 1
337 || __builtin_stdc_first_trailing_one (~0U) != 1
338 || __builtin_stdc_first_trailing_one (~0UL) != 1
339 || __builtin_stdc_first_trailing_one (~0ULL) != 1)
341 if (__builtin_stdc_first_trailing_one ((unsigned char) 4) != 3
342 || __builtin_stdc_first_trailing_one ((unsigned short) 96) != 6
343 || __builtin_stdc_first_trailing_one (127U) != 1
344 || __builtin_stdc_first_trailing_one (511UL) != 1
345 || __builtin_stdc_first_trailing_one (~0ULL << 12) != 13)
347 if (__builtin_stdc_count_zeros ((unsigned char) 0) != __CHAR_BIT__
348 || !expr_has_type (__builtin_stdc_count_zeros ((unsigned char) 0), unsigned int)
349 || __builtin_stdc_count_zeros ((unsigned short) 0) != __SIZEOF_SHORT__
* __CHAR_BIT__
350 || !expr_has_type (__builtin_stdc_count_zeros ((unsigned short) 0), unsigned int)
351 || __builtin_stdc_count_zeros (0U) != __SIZEOF_INT__
* __CHAR_BIT__
352 || !expr_has_type (__builtin_stdc_count_zeros (0U), unsigned int)
353 || __builtin_stdc_count_zeros (0UL) != __SIZEOF_LONG__
* __CHAR_BIT__
354 || !expr_has_type (__builtin_stdc_count_zeros (0UL), unsigned int)
355 || __builtin_stdc_count_zeros (0ULL) != __SIZEOF_LONG_LONG__
* __CHAR_BIT__
356 || !expr_has_type (__builtin_stdc_count_zeros (0ULL), unsigned int))
358 if (__builtin_stdc_count_zeros ((unsigned char) ~0U) != 0
359 || __builtin_stdc_count_zeros ((unsigned short) ~0U) != 0
360 || __builtin_stdc_count_zeros (~0U) != 0
361 || __builtin_stdc_count_zeros (~0UL) != 0
362 || __builtin_stdc_count_zeros (~0ULL) != 0)
364 if (__builtin_stdc_count_zeros ((unsigned char) 1U) != __CHAR_BIT__
- 1
365 || __builtin_stdc_count_zeros ((unsigned short) 42) != __SIZEOF_SHORT__
* __CHAR_BIT__
- 3
366 || __builtin_stdc_count_zeros (291U) != __SIZEOF_INT__
* __CHAR_BIT__
- 4
367 || __builtin_stdc_count_zeros (~1315UL) != 5
368 || __builtin_stdc_count_zeros (3363ULL) != __SIZEOF_LONG_LONG__
* __CHAR_BIT__
- 6)
370 if (__builtin_stdc_count_ones ((unsigned char) 0) != 0
371 || !expr_has_type (__builtin_stdc_count_ones ((unsigned char) 0), unsigned int)
372 || __builtin_stdc_count_ones ((unsigned short) 0) != 0
373 || !expr_has_type (__builtin_stdc_count_ones ((unsigned short) 0), unsigned int)
374 || __builtin_stdc_count_ones (0U) != 0
375 || !expr_has_type (__builtin_stdc_count_ones (0U), unsigned int)
376 || __builtin_stdc_count_ones (0UL) != 0
377 || !expr_has_type (__builtin_stdc_count_ones (0UL), unsigned int)
378 || __builtin_stdc_count_ones (0ULL) != 0
379 || !expr_has_type (__builtin_stdc_count_ones (0ULL), unsigned int))
381 if (__builtin_stdc_count_ones ((unsigned char) ~0U) != __CHAR_BIT__
382 || __builtin_stdc_count_ones ((unsigned short) ~0U) != __SIZEOF_SHORT__
* __CHAR_BIT__
383 || __builtin_stdc_count_ones (~0U) != __SIZEOF_INT__
* __CHAR_BIT__
384 || __builtin_stdc_count_ones (~0UL) != __SIZEOF_LONG__
* __CHAR_BIT__
385 || __builtin_stdc_count_ones (~0ULL) != __SIZEOF_LONG_LONG__
* __CHAR_BIT__
)
387 if (__builtin_stdc_count_ones ((unsigned char) ~1U) != __CHAR_BIT__
- 1
388 || __builtin_stdc_count_ones ((unsigned short) ~42) != __SIZEOF_SHORT__
* __CHAR_BIT__
- 3
389 || __builtin_stdc_count_ones (~291U) != __SIZEOF_INT__
* __CHAR_BIT__
- 4
390 || __builtin_stdc_count_ones (1315UL) != 5
391 || __builtin_stdc_count_ones (~3363ULL) != __SIZEOF_LONG_LONG__
* __CHAR_BIT__
- 6)
393 if (__builtin_stdc_has_single_bit ((unsigned char) 0)
394 || !expr_has_type (__builtin_stdc_has_single_bit ((unsigned char) 0), _Bool
)
395 || __builtin_stdc_has_single_bit ((unsigned short) 0)
396 || !expr_has_type (__builtin_stdc_has_single_bit ((unsigned short) 0), _Bool
)
397 || __builtin_stdc_has_single_bit (0U)
398 || !expr_has_type (__builtin_stdc_has_single_bit (0U), _Bool
)
399 || __builtin_stdc_has_single_bit (0UL)
400 || !expr_has_type (__builtin_stdc_has_single_bit (0UL), _Bool
)
401 || __builtin_stdc_has_single_bit (0ULL)
402 || !expr_has_type (__builtin_stdc_has_single_bit (0ULL), _Bool
))
404 if (!__builtin_stdc_has_single_bit ((unsigned char) 2)
405 || !__builtin_stdc_has_single_bit ((unsigned short) 8)
406 || !__builtin_stdc_has_single_bit (32U)
407 || !__builtin_stdc_has_single_bit (128UL)
408 || !__builtin_stdc_has_single_bit (512ULL))
410 if (__builtin_stdc_has_single_bit ((unsigned char) 7)
411 || __builtin_stdc_has_single_bit ((unsigned short) 96)
412 || __builtin_stdc_has_single_bit (513U)
413 || __builtin_stdc_has_single_bit (1022UL)
414 || __builtin_stdc_has_single_bit (12ULL))
416 if (__builtin_stdc_bit_width ((unsigned char) 0) != 0
417 || !expr_has_type (__builtin_stdc_bit_width ((unsigned char) 0), unsigned int)
418 || __builtin_stdc_bit_width ((unsigned short) 0) != 0
419 || !expr_has_type (__builtin_stdc_bit_width ((unsigned short) 0), unsigned int)
420 || __builtin_stdc_bit_width (0U) != 0
421 || !expr_has_type (__builtin_stdc_bit_width (0U), unsigned int)
422 || __builtin_stdc_bit_width (0UL) != 0
423 || !expr_has_type (__builtin_stdc_bit_width (0UL), unsigned int)
424 || __builtin_stdc_bit_width (0ULL) != 0
425 || !expr_has_type (__builtin_stdc_bit_width (0ULL), unsigned int))
427 if (__builtin_stdc_bit_width ((unsigned char) ~0U) != __CHAR_BIT__
428 || __builtin_stdc_bit_width ((unsigned short) ~0U) != __SIZEOF_SHORT__
* __CHAR_BIT__
429 || __builtin_stdc_bit_width (~0U) != __SIZEOF_INT__
* __CHAR_BIT__
430 || __builtin_stdc_bit_width (~0UL) != __SIZEOF_LONG__
* __CHAR_BIT__
431 || __builtin_stdc_bit_width (~0ULL) != __SIZEOF_LONG_LONG__
* __CHAR_BIT__
)
433 if (__builtin_stdc_bit_width ((unsigned char) ((unsigned char) ~0U >> 1)) != __CHAR_BIT__
- 1
434 || __builtin_stdc_bit_width ((unsigned char) 6) != 3
435 || __builtin_stdc_bit_width ((unsigned short) 12U) != 4
436 || __builtin_stdc_bit_width ((unsigned short) ((unsigned short) ~0U >> 5)) != __SIZEOF_SHORT__
* __CHAR_BIT__
- 5
437 || __builtin_stdc_bit_width (137U) != 8
438 || __builtin_stdc_bit_width (269U) != 9
439 || __builtin_stdc_bit_width (39UL) != 6
440 || __builtin_stdc_bit_width (~0UL >> 2) != __SIZEOF_LONG__
* __CHAR_BIT__
- 2
441 || __builtin_stdc_bit_width (1023ULL) != 10
442 || __builtin_stdc_bit_width (1024ULL) != 11)
444 if (__builtin_stdc_bit_floor ((unsigned char) 0) != 0
445 || !expr_has_type (__builtin_stdc_bit_floor ((unsigned char) 0), unsigned char)
446 || __builtin_stdc_bit_floor ((unsigned short) 0) != 0
447 || !expr_has_type (__builtin_stdc_bit_floor ((unsigned short) 0), unsigned short)
448 || __builtin_stdc_bit_floor (0U) != 0U
449 || !expr_has_type (__builtin_stdc_bit_floor (0U), unsigned int)
450 || __builtin_stdc_bit_floor (0UL) != 0UL
451 || !expr_has_type (__builtin_stdc_bit_floor (0UL), unsigned long)
452 || __builtin_stdc_bit_floor (0ULL) != 0ULL
453 || !expr_has_type (__builtin_stdc_bit_floor (0ULL), unsigned long long))
455 if (__builtin_stdc_bit_floor ((unsigned char) ~0U) != (1U << (__CHAR_BIT__
- 1))
456 || __builtin_stdc_bit_floor ((unsigned short) ~0U) != (1U << (__SIZEOF_SHORT__
* __CHAR_BIT__
- 1))
457 || __builtin_stdc_bit_floor (~0U) != (1U << (__SIZEOF_INT__
* __CHAR_BIT__
- 1))
458 || __builtin_stdc_bit_floor (~0UL) != (1UL << (__SIZEOF_LONG__
* __CHAR_BIT__
- 1))
459 || __builtin_stdc_bit_floor (~0ULL) != (1ULL << (__SIZEOF_LONG_LONG__
* __CHAR_BIT__
- 1)))
461 if (__builtin_stdc_bit_floor ((unsigned char) 4) != 4
462 || __builtin_stdc_bit_floor ((unsigned char) 7) != 4
463 || __builtin_stdc_bit_floor ((unsigned short) 8U) != 8
464 || __builtin_stdc_bit_floor ((unsigned short) 31U) != 16
465 || __builtin_stdc_bit_floor (137U) != 128U
466 || __builtin_stdc_bit_floor (269U) != 256U
467 || __builtin_stdc_bit_floor (511UL) != 256UL
468 || __builtin_stdc_bit_floor (512UL) != 512UL
469 || __builtin_stdc_bit_floor (513UL) != 512ULL
470 || __builtin_stdc_bit_floor (1024ULL) != 1024ULL)
472 if (__builtin_stdc_bit_ceil ((unsigned char) 0) != 1
473 || !expr_has_type (__builtin_stdc_bit_ceil ((unsigned char) 0), unsigned char)
474 || __builtin_stdc_bit_ceil ((unsigned short) 0) != 1
475 || !expr_has_type (__builtin_stdc_bit_ceil ((unsigned short) 0), unsigned short)
476 || __builtin_stdc_bit_ceil (0U) != 1U
477 || !expr_has_type (__builtin_stdc_bit_ceil (0U), unsigned int)
478 || __builtin_stdc_bit_ceil (0UL) != 1UL
479 || !expr_has_type (__builtin_stdc_bit_ceil (0UL), unsigned long)
480 || __builtin_stdc_bit_ceil (0ULL) != 1ULL
481 || !expr_has_type (__builtin_stdc_bit_ceil (0ULL), unsigned long long))
483 if (__builtin_stdc_bit_ceil ((unsigned char) ~0U) != 0
484 || __builtin_stdc_bit_ceil ((unsigned short) ~0U) != 0
485 || __builtin_stdc_bit_ceil (~0U) != 0U
486 || __builtin_stdc_bit_ceil (~0UL) != 0UL
487 || __builtin_stdc_bit_ceil (~0ULL) != 0ULL)
489 if (__builtin_stdc_bit_ceil ((unsigned char) ((unsigned char) ~0U >> 1)) != (1U << (__CHAR_BIT__
- 1))
490 || __builtin_stdc_bit_ceil ((unsigned char) ((unsigned char) ~0U >> 1)) != (1U << (__CHAR_BIT__
- 1))
491 || __builtin_stdc_bit_ceil ((unsigned short) ((unsigned short) ~0U >> 1)) != (1U << (__SIZEOF_SHORT__
* __CHAR_BIT__
- 1))
492 || __builtin_stdc_bit_ceil ((unsigned short) ((unsigned short) ~0U >> 1)) != (1U << (__SIZEOF_SHORT__
* __CHAR_BIT__
- 1))
493 || __builtin_stdc_bit_ceil (~0U >> 1) != (1U << (__SIZEOF_INT__
* __CHAR_BIT__
- 1))
494 || __builtin_stdc_bit_ceil (1U << (__SIZEOF_INT__
* __CHAR_BIT__
- 1)) != (1U << (__SIZEOF_INT__
* __CHAR_BIT__
- 1))
495 || __builtin_stdc_bit_ceil (~0UL >> 1) != (1UL << (__SIZEOF_LONG__
* __CHAR_BIT__
- 1))
496 || __builtin_stdc_bit_ceil (~0UL >> 1) != (1UL << (__SIZEOF_LONG__
* __CHAR_BIT__
- 1))
497 || __builtin_stdc_bit_ceil (1ULL << (__SIZEOF_LONG_LONG__
* __CHAR_BIT__
- 1)) != (1ULL << (__SIZEOF_LONG_LONG__
* __CHAR_BIT__
- 1))
498 || __builtin_stdc_bit_ceil (~0ULL >> 1) != (1ULL << (__SIZEOF_LONG_LONG__
* __CHAR_BIT__
- 1)))
500 if (__builtin_stdc_bit_ceil ((unsigned char) 1) != 1
501 || __builtin_stdc_bit_ceil ((unsigned char) 2) != 2
502 || __builtin_stdc_bit_ceil ((unsigned short) 3U) != 4
503 || __builtin_stdc_bit_ceil ((unsigned short) 4U) != 4
504 || __builtin_stdc_bit_ceil (5U) != 8U
505 || __builtin_stdc_bit_ceil (269U) != 512U
506 || __builtin_stdc_bit_ceil (511UL) != 512UL
507 || __builtin_stdc_bit_ceil (512UL) != 512UL
508 || __builtin_stdc_bit_ceil (513ULL) != 1024ULL
509 || __builtin_stdc_bit_ceil (1025ULL) != 2048ULL)
511 #ifdef __SIZEOF_INT128__
512 if (__builtin_stdc_leading_zeros ((unsigned __int128
) 0) != __SIZEOF_INT128__
* __CHAR_BIT__
513 || !expr_has_type (__builtin_stdc_leading_zeros ((unsigned __int128
) 0), unsigned int)
514 || __builtin_stdc_leading_zeros (~(unsigned __int128
) 0) != 0)
516 if (__builtin_stdc_leading_ones ((unsigned __int128
) 0) != 0
517 || !expr_has_type (__builtin_stdc_leading_ones ((unsigned __int128
) 0), unsigned int)
518 || __builtin_stdc_leading_ones (~(unsigned __int128
) 0) != __SIZEOF_INT128__
* __CHAR_BIT__
)
520 if (__builtin_stdc_trailing_zeros ((unsigned __int128
) 0) != __SIZEOF_INT128__
* __CHAR_BIT__
521 || !expr_has_type (__builtin_stdc_trailing_zeros ((unsigned __int128
) 0), unsigned int)
522 || __builtin_stdc_trailing_zeros (~(unsigned __int128
) 0) != 0)
524 if (__builtin_stdc_trailing_ones ((unsigned __int128
) 0) != 0
525 || !expr_has_type (__builtin_stdc_trailing_ones ((unsigned __int128
) 0), unsigned int)
526 || __builtin_stdc_trailing_ones (~(unsigned __int128
) 0) != __SIZEOF_INT128__
* __CHAR_BIT__
)
528 if (__builtin_stdc_first_leading_zero ((unsigned __int128
) 0) != 1
529 || !expr_has_type (__builtin_stdc_first_leading_zero ((unsigned __int128
) 0), unsigned int)
530 || __builtin_stdc_first_leading_zero (~(unsigned __int128
) 0) != 0)
532 if (__builtin_stdc_first_leading_one ((unsigned __int128
) 0) != 0
533 || !expr_has_type (__builtin_stdc_first_leading_one ((unsigned __int128
) 0), unsigned int)
534 || __builtin_stdc_first_leading_one (~(unsigned __int128
) 0) != 1)
536 if (__builtin_stdc_first_trailing_zero ((unsigned __int128
) 0) != 1
537 || !expr_has_type (__builtin_stdc_first_trailing_zero ((unsigned __int128
) 0), unsigned int)
538 || __builtin_stdc_first_trailing_zero (~(unsigned __int128
) 0) != 0)
540 if (__builtin_stdc_first_trailing_one ((unsigned __int128
) 0) != 0
541 || !expr_has_type (__builtin_stdc_first_trailing_one ((unsigned __int128
) 0), unsigned int)
542 || __builtin_stdc_first_trailing_one (~(unsigned __int128
) 0) != 1)
544 if (__builtin_stdc_count_zeros ((unsigned __int128
) 0) != __SIZEOF_INT128__
* __CHAR_BIT__
545 || !expr_has_type (__builtin_stdc_count_zeros ((unsigned __int128
) 0), unsigned int)
546 || __builtin_stdc_count_zeros (~(unsigned __int128
) 0) != 0)
548 if (__builtin_stdc_count_ones ((unsigned __int128
) 0) != 0
549 || !expr_has_type (__builtin_stdc_count_ones ((unsigned __int128
) 0), unsigned int)
550 || __builtin_stdc_count_ones (~(unsigned __int128
) 0) != __SIZEOF_INT128__
* __CHAR_BIT__
)
552 if (__builtin_stdc_has_single_bit ((unsigned __int128
) 0)
553 || !expr_has_type (__builtin_stdc_has_single_bit ((unsigned __int128
) 0), _Bool
)
554 || __builtin_stdc_has_single_bit (~(unsigned __int128
) 0))
556 if (__builtin_stdc_bit_width ((unsigned __int128
) 0) != 0
557 || !expr_has_type (__builtin_stdc_bit_width ((unsigned __int128
) 0), unsigned int)
558 || __builtin_stdc_bit_width (~(unsigned __int128
) 0) != __SIZEOF_INT128__
* __CHAR_BIT__
)
560 if (__builtin_stdc_bit_floor ((unsigned __int128
) 0) != 0
561 || !expr_has_type (__builtin_stdc_bit_floor ((unsigned __int128
) 0), unsigned __int128
)
562 || __builtin_stdc_bit_floor (~(unsigned __int128
) 0) != ((unsigned __int128
) 1) << (__SIZEOF_INT128__
* __CHAR_BIT__
- 1))
564 if (__builtin_stdc_bit_ceil ((unsigned __int128
) 0) != 1
565 || !expr_has_type (__builtin_stdc_bit_ceil ((unsigned __int128
) 0), unsigned __int128
)
566 || __builtin_stdc_bit_ceil ((unsigned __int128
) 1) != 1
567 || __builtin_stdc_bit_ceil ((~(unsigned __int128
) 0) >> 1) != ((unsigned __int128
) 1) << (__SIZEOF_INT128__
* __CHAR_BIT__
- 1)
568 || __builtin_stdc_bit_ceil (~(unsigned __int128
) 0) != 0)
571 #if __has_builtin (__builtin_stdc_leading_zeros) != 1
572 #error __builtin_stdc_leading_zeros not implemented
574 #if __has_builtin (__builtin_stdc_leading_ones) != 1
575 #error __builtin_stdc_leading_ones not implemented
577 #if __has_builtin (__builtin_stdc_trailing_zeros) != 1
578 #error __builtin_stdc_trailing_zeros not implemented
580 #if __has_builtin (__builtin_stdc_trailing_ones) != 1
581 #error __builtin_stdc_trailing_ones not implemented
583 #if __has_builtin (__builtin_stdc_first_leading_zero) != 1
584 #error __builtin_stdc_first_leading_zero not implemented
586 #if __has_builtin (__builtin_stdc_first_leading_one) != 1
587 #error __builtin_stdc_first_leading_one not implemented
589 #if __has_builtin (__builtin_stdc_first_trailing_zero) != 1
590 #error __builtin_stdc_first_trailing_zero not implemented
592 #if __has_builtin (__builtin_stdc_first_trailing_one) != 1
593 #error __builtin_stdc_first_trailing_one not implemented
595 #if __has_builtin (__builtin_stdc_count_zeros) != 1
596 #error __builtin_stdc_count_zeros not implemented
598 #if __has_builtin (__builtin_stdc_count_ones) != 1
599 #error __builtin_stdc_count_ones not implemented
601 #if __has_builtin (__builtin_stdc_has_single_bit) != 1
602 #error __builtin_stdc_single_bit not implemented
604 #if __has_builtin (__builtin_stdc_bit_width) != 1
605 #error __builtin_stdc_bit_width not implemented
607 #if __has_builtin (__builtin_stdc_bit_floor) != 1
608 #error __builtin_stdc_bit_floor not implemented
610 #if __has_builtin (__builtin_stdc_bit_ceil) != 1
611 #error __builtin_stdc_bit_ceil not implemented
614 if (__builtin_stdc_bit_width (a
++) != 0 || a
!= 1)
616 unsigned long long b
= 0;
617 if (__builtin_stdc_bit_width (b
++) != 0 || b
!= 1)
619 if (__builtin_stdc_bit_floor (a
++) != 1 || a
!= 2)
621 if (__builtin_stdc_bit_floor (b
++) != 1 || b
!= 2)
623 if (__builtin_stdc_bit_ceil (a
++) != 2 || a
!= 3)
625 if (__builtin_stdc_bit_ceil (b
++) != 2 || b
!= 3)
627 if (__builtin_stdc_leading_zeros (a
++) != __CHAR_BIT__
- 2 || a
!= 4)
629 if (__builtin_stdc_leading_zeros (b
++) != __SIZEOF_LONG_LONG__
* __CHAR_BIT__
- 2 || b
!= 4)
631 if (__builtin_stdc_leading_ones (a
++) != 0 || a
!= 5)
633 if (__builtin_stdc_leading_ones (b
++) != 0 || b
!= 5)
635 if (__builtin_stdc_trailing_zeros (a
++) != 0 || a
!= 6)
637 if (__builtin_stdc_trailing_zeros (b
++) != 0 || b
!= 6)
639 if (__builtin_stdc_trailing_ones (a
++) != 0 || a
!= 7)
641 if (__builtin_stdc_trailing_ones (b
++) != 0 || b
!= 7)
643 if (__builtin_stdc_first_leading_zero (a
++) != 1 || a
!= 8)
645 if (__builtin_stdc_first_leading_zero (b
++) != 1 || b
!= 8)
647 if (__builtin_stdc_first_leading_one (a
++) != __CHAR_BIT__
- 3 || a
!= 9)
649 if (__builtin_stdc_first_leading_one (b
++) != __SIZEOF_LONG_LONG__
* __CHAR_BIT__
- 3 || b
!= 9)
651 if (__builtin_stdc_first_trailing_zero (a
++) != 2 || a
!= 10)
653 if (__builtin_stdc_first_trailing_zero (b
++) != 2 || b
!= 10)
655 if (__builtin_stdc_first_trailing_one (a
++) != 2 || a
!= 11)
657 if (__builtin_stdc_first_trailing_one (b
++) != 2 || b
!= 11)
659 if (__builtin_stdc_count_zeros (a
++) != __CHAR_BIT__
- 3 || a
!= 12)
661 if (__builtin_stdc_count_zeros (b
++) != __SIZEOF_LONG_LONG__
* __CHAR_BIT__
- 3 || b
!= 12)
663 if (__builtin_stdc_count_ones (a
++) != 2 || a
!= 13)
665 if (__builtin_stdc_count_ones (b
++) != 2 || b
!= 13)
667 if (__builtin_stdc_has_single_bit (a
++) || a
!= 14)
669 if (__builtin_stdc_has_single_bit (b
++) || b
!= 14)
671 #if __BITINT_MAXWIDTH__ >= 64
672 if (__builtin_stdc_leading_zeros (0uwb
) != 1
673 || !expr_has_type (__builtin_stdc_leading_zeros (0uwb
), unsigned int)
674 || __builtin_stdc_leading_zeros (1uwb
) != 0
675 || !expr_has_type (__builtin_stdc_leading_zeros (1uwb
), unsigned int))
677 if (__builtin_stdc_leading_ones (0uwb
) != 0
678 || !expr_has_type (__builtin_stdc_leading_ones (0uwb
), unsigned int)
679 || __builtin_stdc_leading_ones (1uwb
) != 1
680 || !expr_has_type (__builtin_stdc_leading_ones (1uwb
), unsigned int))
682 if (__builtin_stdc_trailing_zeros (0uwb
) != 1
683 || !expr_has_type (__builtin_stdc_trailing_zeros (0uwb
), unsigned int)
684 || __builtin_stdc_trailing_zeros (1uwb
) != 0
685 || !expr_has_type (__builtin_stdc_trailing_zeros (1uwb
), unsigned int))
687 if (__builtin_stdc_trailing_ones (0uwb
) != 0
688 || !expr_has_type (__builtin_stdc_trailing_ones (0uwb
), unsigned int)
689 || __builtin_stdc_trailing_ones (1uwb
) != 1
690 || !expr_has_type (__builtin_stdc_trailing_ones (1uwb
), unsigned int))
692 if (__builtin_stdc_first_leading_zero (0uwb
) != 1
693 || !expr_has_type (__builtin_stdc_first_leading_zero (0uwb
), unsigned int)
694 || __builtin_stdc_first_leading_zero (1uwb
) != 0
695 || !expr_has_type (__builtin_stdc_first_leading_zero (1uwb
), unsigned int))
697 if (__builtin_stdc_first_leading_one (0uwb
) != 0
698 || !expr_has_type (__builtin_stdc_first_leading_one (0uwb
), unsigned int)
699 || __builtin_stdc_first_leading_one (1uwb
) != 1
700 || !expr_has_type (__builtin_stdc_first_leading_one (1uwb
), unsigned int))
702 if (__builtin_stdc_first_trailing_zero (0uwb
) != 1
703 || !expr_has_type (__builtin_stdc_first_trailing_zero (0uwb
), unsigned int)
704 || __builtin_stdc_first_trailing_zero (1uwb
) != 0
705 || !expr_has_type (__builtin_stdc_first_trailing_zero (1uwb
), unsigned int))
707 if (__builtin_stdc_first_trailing_one (0uwb
) != 0
708 || !expr_has_type (__builtin_stdc_first_trailing_one (0uwb
), unsigned int)
709 || __builtin_stdc_first_trailing_one (1uwb
) != 1
710 || !expr_has_type (__builtin_stdc_first_trailing_one (1uwb
), unsigned int))
712 if (__builtin_stdc_count_zeros (0uwb
) != 1
713 || !expr_has_type (__builtin_stdc_count_zeros (0uwb
), unsigned int)
714 || __builtin_stdc_count_zeros (1uwb
) != 0
715 || !expr_has_type (__builtin_stdc_count_zeros (1uwb
), unsigned int))
717 if (__builtin_stdc_count_ones (0uwb
) != 0
718 || !expr_has_type (__builtin_stdc_count_ones (0uwb
), unsigned int)
719 || __builtin_stdc_count_ones (1uwb
) != 1
720 || !expr_has_type (__builtin_stdc_count_ones (1uwb
), unsigned int))
722 if (__builtin_stdc_has_single_bit (0uwb
)
723 || !expr_has_type (__builtin_stdc_has_single_bit (0uwb
), _Bool
)
724 || !__builtin_stdc_has_single_bit (1uwb
)
725 || !expr_has_type (__builtin_stdc_has_single_bit (1uwb
), _Bool
))
727 if (__builtin_stdc_bit_width (0uwb
) != 0
728 || !expr_has_type (__builtin_stdc_bit_width (0uwb
), unsigned int)
729 || __builtin_stdc_bit_width (1uwb
) != 1
730 || !expr_has_type (__builtin_stdc_bit_width (1uwb
), unsigned int))
732 if (__builtin_stdc_bit_floor (0uwb
) != 0
733 || !expr_has_type (__builtin_stdc_bit_floor (0uwb
), unsigned _BitInt(1))
734 || __builtin_stdc_bit_floor (1uwb
) != 1
735 || !expr_has_type (__builtin_stdc_bit_floor (1uwb
), unsigned _BitInt(1)))
737 if (__builtin_stdc_bit_ceil (0uwb
) != 1
738 || !expr_has_type (__builtin_stdc_bit_ceil (0uwb
), unsigned _BitInt(1))
739 || __builtin_stdc_bit_ceil (1uwb
) != 1
740 || !expr_has_type (__builtin_stdc_bit_ceil (1uwb
), unsigned _BitInt(1)))
742 unsigned _BitInt(1) c
= 0;
743 if (__builtin_stdc_bit_floor (c
++) != 0 || c
!= 1)
745 if (__builtin_stdc_bit_floor (c
++) != 1 || c
!= 0)
747 if (__builtin_stdc_bit_ceil (c
++) != 1 || c
!= 1)
749 if (__builtin_stdc_bit_ceil (c
++) != 1 || c
!= 0)
752 #if __BITINT_MAXWIDTH__ >= 512
753 if (__builtin_stdc_leading_zeros ((unsigned _BitInt(512)) 0) != 512
754 || !expr_has_type (__builtin_stdc_leading_zeros ((unsigned _BitInt(512)) 0), unsigned int)
755 || __builtin_stdc_leading_zeros ((unsigned _BitInt(373)) 0) != 373
756 || !expr_has_type (__builtin_stdc_leading_zeros ((unsigned _BitInt(373)) 0), unsigned int))
758 if (__builtin_stdc_leading_zeros (~(unsigned _BitInt(512)) 0) != 0
759 || __builtin_stdc_leading_zeros (~(unsigned _BitInt(373)) 0) != 0)
761 if (__builtin_stdc_leading_zeros ((unsigned _BitInt(512)) 275) != 512 - 9
762 || __builtin_stdc_leading_zeros ((unsigned _BitInt(373)) 512) != 373 - 10)
764 if (__builtin_stdc_leading_ones ((unsigned _BitInt(512)) 0) != 0
765 || !expr_has_type (__builtin_stdc_leading_ones ((unsigned _BitInt(512)) 0), unsigned int)
766 || __builtin_stdc_leading_ones ((unsigned _BitInt(373)) 0) != 0
767 || !expr_has_type (__builtin_stdc_leading_ones ((unsigned _BitInt(373)) 0), unsigned int))
769 if (__builtin_stdc_leading_ones (~(unsigned _BitInt(512)) 0) != 512
770 || __builtin_stdc_leading_ones (~(unsigned _BitInt(373)) 0) != 373)
772 if (__builtin_stdc_leading_ones (~(unsigned _BitInt(512)) 275) != 512 - 9
773 || __builtin_stdc_leading_ones (~(unsigned _BitInt(373)) 512) != 373 - 10)
775 if (__builtin_stdc_trailing_zeros ((unsigned _BitInt(512)) 0) != 512
776 || !expr_has_type (__builtin_stdc_trailing_zeros ((unsigned _BitInt(512)) 0), unsigned int)
777 || __builtin_stdc_trailing_zeros ((unsigned _BitInt(373)) 0) != 373
778 || !expr_has_type (__builtin_stdc_trailing_zeros ((unsigned _BitInt(373)) 0), unsigned int))
780 if (__builtin_stdc_trailing_zeros (~(unsigned _BitInt(512)) 0) != 0
781 || __builtin_stdc_trailing_zeros (~(unsigned _BitInt(373)) 0) != 0)
783 if (__builtin_stdc_trailing_zeros ((unsigned _BitInt(512)) 256) != 8
784 || __builtin_stdc_trailing_zeros ((unsigned _BitInt(373)) 512) != 9)
786 if (__builtin_stdc_trailing_ones ((unsigned _BitInt(512)) 0) != 0
787 || !expr_has_type (__builtin_stdc_trailing_ones ((unsigned _BitInt(512)) 0), unsigned int)
788 || __builtin_stdc_trailing_ones ((unsigned _BitInt(373)) 0) != 0
789 || !expr_has_type (__builtin_stdc_trailing_ones ((unsigned _BitInt(373)) 0), unsigned int))
791 if (__builtin_stdc_trailing_ones (~(unsigned _BitInt(512)) 0) != 512
792 || __builtin_stdc_trailing_ones (~(unsigned _BitInt(373)) 0) != 373)
794 if (__builtin_stdc_trailing_ones ((unsigned _BitInt(512)) 255) != 8
795 || __builtin_stdc_trailing_ones ((~(unsigned _BitInt(373)) 0) >> 2) != 373 - 2)
797 if (__builtin_stdc_first_leading_zero ((unsigned _BitInt(512)) 0) != 1
798 || !expr_has_type (__builtin_stdc_first_leading_zero ((unsigned _BitInt(512)) 0), unsigned int)
799 || __builtin_stdc_first_leading_zero ((unsigned _BitInt(373)) 0) != 1
800 || !expr_has_type (__builtin_stdc_first_leading_zero ((unsigned _BitInt(373)) 0), unsigned int))
802 if (__builtin_stdc_first_leading_zero (~(unsigned _BitInt(512)) 0) != 0
803 || __builtin_stdc_first_leading_zero (~(unsigned _BitInt(373)) 0) != 0)
805 if (__builtin_stdc_first_leading_zero (~(unsigned _BitInt(512)) 511) != 512 - 8
806 || __builtin_stdc_first_leading_zero (~(unsigned _BitInt(373)) 1023) != 373 - 9)
808 if (__builtin_stdc_first_leading_one ((unsigned _BitInt(512)) 0) != 0
809 || !expr_has_type (__builtin_stdc_first_leading_one ((unsigned _BitInt(512)) 0), unsigned int)
810 || __builtin_stdc_first_leading_one ((unsigned _BitInt(373)) 0) != 0
811 || !expr_has_type (__builtin_stdc_first_leading_one ((unsigned _BitInt(373)) 0), unsigned int))
813 if (__builtin_stdc_first_leading_one (~(unsigned _BitInt(512)) 0) != 1
814 || __builtin_stdc_first_leading_one (~(unsigned _BitInt(373)) 0) != 1)
816 if (__builtin_stdc_first_leading_one ((unsigned _BitInt(512)) 275) != 512 - 8
817 || __builtin_stdc_first_leading_one ((unsigned _BitInt(373)) 512) != 373 - 9)
819 if (__builtin_stdc_first_trailing_zero ((unsigned _BitInt(512)) 0) != 1
820 || !expr_has_type (__builtin_stdc_first_trailing_zero ((unsigned _BitInt(512)) 0), unsigned int)
821 || __builtin_stdc_first_trailing_zero ((unsigned _BitInt(373)) 0) != 1
822 || !expr_has_type (__builtin_stdc_first_trailing_zero ((unsigned _BitInt(373)) 0), unsigned int))
824 if (__builtin_stdc_first_trailing_zero (~(unsigned _BitInt(512)) 0) != 0
825 || __builtin_stdc_first_trailing_zero (~(unsigned _BitInt(373)) 0) != 0)
827 if (__builtin_stdc_first_trailing_zero ((unsigned _BitInt(512)) 255) != 9
828 || __builtin_stdc_first_trailing_zero ((unsigned _BitInt(373)) 511) != 10)
830 if (__builtin_stdc_first_trailing_one ((unsigned _BitInt(512)) 0) != 0
831 || !expr_has_type (__builtin_stdc_first_trailing_one ((unsigned _BitInt(512)) 0), unsigned int)
832 || __builtin_stdc_first_trailing_one ((unsigned _BitInt(373)) 0) != 0
833 || !expr_has_type (__builtin_stdc_first_trailing_one ((unsigned _BitInt(373)) 0), unsigned int))
835 if (__builtin_stdc_first_trailing_one (~(unsigned _BitInt(512)) 0) != 1
836 || __builtin_stdc_first_trailing_one (~(unsigned _BitInt(373)) 0) != 1)
838 if (__builtin_stdc_first_trailing_one (((unsigned _BitInt(512)) 255) << 175) != 176
839 || __builtin_stdc_first_trailing_one ((~(unsigned _BitInt(373)) 0) << 311) != 312)
841 if (__builtin_stdc_count_zeros ((unsigned _BitInt(512)) 0) != 512
842 || !expr_has_type (__builtin_stdc_count_zeros ((unsigned _BitInt(512)) 0), unsigned int)
843 || __builtin_stdc_count_zeros ((unsigned _BitInt(373)) 0) != 373
844 || !expr_has_type (__builtin_stdc_count_zeros ((unsigned _BitInt(373)) 0), unsigned int))
846 if (__builtin_stdc_count_zeros (~(unsigned _BitInt(512)) 0) != 0
847 || __builtin_stdc_count_zeros (~(unsigned _BitInt(373)) 0) != 0)
849 if (__builtin_stdc_count_zeros ((unsigned _BitInt(512)) 1315) != 512 - 5
850 || __builtin_stdc_count_zeros ((unsigned _BitInt(373)) 3363) != 373 - 6)
852 if (__builtin_stdc_count_ones ((unsigned _BitInt(512)) 0) != 0
853 || !expr_has_type (__builtin_stdc_count_ones ((unsigned _BitInt(512)) 0), unsigned int)
854 || __builtin_stdc_count_ones ((unsigned _BitInt(373)) 0) != 0
855 || !expr_has_type (__builtin_stdc_count_ones ((unsigned _BitInt(373)) 0), unsigned int))
857 if (__builtin_stdc_count_ones (~(unsigned _BitInt(512)) 0) != 512
858 || __builtin_stdc_count_ones (~(unsigned _BitInt(373)) 0) != 373)
860 if (__builtin_stdc_count_ones (~(unsigned _BitInt(512)) 1315) != 512 - 5
861 || __builtin_stdc_count_ones (~(unsigned _BitInt(373)) 3363) != 373 - 6)
863 if (__builtin_stdc_has_single_bit ((unsigned _BitInt(512)) 0)
864 || !expr_has_type (__builtin_stdc_has_single_bit ((unsigned _BitInt(512)) 0), _Bool
)
865 || __builtin_stdc_has_single_bit ((unsigned _BitInt(373)) 0)
866 || !expr_has_type (__builtin_stdc_has_single_bit ((unsigned _BitInt(373)) 0), _Bool
))
868 if (__builtin_stdc_has_single_bit (~(unsigned _BitInt(512)) 0)
869 || __builtin_stdc_has_single_bit (~(unsigned _BitInt(373)) 0))
871 if (__builtin_stdc_has_single_bit (((unsigned _BitInt(512)) 1022) << 279)
872 || __builtin_stdc_has_single_bit (((unsigned _BitInt(373)) 12) << 305))
874 if (__builtin_stdc_bit_width ((unsigned _BitInt(512)) 0) != 0
875 || !expr_has_type (__builtin_stdc_bit_width ((unsigned _BitInt(512)) 0), unsigned int)
876 || __builtin_stdc_bit_width ((unsigned _BitInt(373)) 0) != 0
877 || !expr_has_type (__builtin_stdc_bit_width ((unsigned _BitInt(373)) 0), unsigned int))
879 if (__builtin_stdc_bit_width (~(unsigned _BitInt(512)) 0) != 512
880 || __builtin_stdc_bit_width (~(unsigned _BitInt(373)) 0) != 373)
882 if (__builtin_stdc_bit_width (((unsigned _BitInt(512)) 1023) << 405) != 405 + 10
883 || __builtin_stdc_bit_width (((unsigned _BitInt(373)) 1024) << 242) != 242 + 11)
885 if (__builtin_stdc_bit_floor ((unsigned _BitInt(512)) 0) != 0
886 || !expr_has_type (__builtin_stdc_bit_floor ((unsigned _BitInt(512)) 0), unsigned _BitInt(512))
887 || __builtin_stdc_bit_floor ((unsigned _BitInt(373)) 0) != 0
888 || !expr_has_type (__builtin_stdc_bit_floor ((unsigned _BitInt(373)) 0), unsigned _BitInt(373)))
890 if (__builtin_stdc_bit_floor (~(unsigned _BitInt(512)) 0) != ((unsigned _BitInt(512)) 1) << (512 - 1)
891 || __builtin_stdc_bit_floor (~(unsigned _BitInt(373)) 0) != ((unsigned _BitInt(373)) 1) << (373 - 1))
893 if (__builtin_stdc_bit_floor (((unsigned _BitInt(512)) 511) << 405) != (((unsigned _BitInt(512)) 256) << 405)
894 || __builtin_stdc_bit_floor (((unsigned _BitInt(373)) 512) << 242) != (((unsigned _BitInt(512)) 512) << 242))
896 if (__builtin_stdc_bit_ceil ((unsigned _BitInt(512)) 0) != 1
897 || !expr_has_type (__builtin_stdc_bit_ceil ((unsigned _BitInt(512)) 0), unsigned _BitInt(512))
898 || __builtin_stdc_bit_ceil ((unsigned _BitInt(373)) 0) != 1
899 || !expr_has_type (__builtin_stdc_bit_ceil ((unsigned _BitInt(373)) 0), unsigned _BitInt(373)))
901 if (__builtin_stdc_bit_ceil (~(unsigned _BitInt(512)) 0) != 0
902 || __builtin_stdc_bit_ceil (~(unsigned _BitInt(373)) 0) != 0)
904 if (__builtin_stdc_bit_ceil (((unsigned _BitInt(512)) 1) << (512 - 1)) != ((unsigned _BitInt(512)) 1) << (512 - 1)
905 || __builtin_stdc_bit_ceil ((~(unsigned _BitInt(373)) 0) >> 1) != ((unsigned _BitInt(373)) 1) << (373 - 1))
907 if (__builtin_stdc_bit_ceil (((unsigned _BitInt(512)) 512) << 405) != (((unsigned _BitInt(512)) 512) << 405)
908 || __builtin_stdc_bit_ceil (((unsigned _BitInt(373)) 513) << 242) != (((unsigned _BitInt(512)) 1024) << 242))
910 if (__builtin_stdc_bit_floor ((unsigned _BitInt(__BITINT_MAXWIDTH__
)) 0) != 0)
912 if (__builtin_stdc_bit_floor (~(unsigned _BitInt(__BITINT_MAXWIDTH__
)) 0) != ((unsigned _BitInt(__BITINT_MAXWIDTH__
)) 1) << (__BITINT_MAXWIDTH__
- 1))
914 if (__builtin_stdc_bit_floor (((unsigned _BitInt(__BITINT_MAXWIDTH__
)) 511) << 405) != (((unsigned _BitInt(__BITINT_MAXWIDTH__
)) 256) << 405)
915 || __builtin_stdc_bit_floor (((unsigned _BitInt(__BITINT_MAXWIDTH__
)) 512) << 405) != (((unsigned _BitInt(__BITINT_MAXWIDTH__
)) 512) << 405))
917 if (__builtin_stdc_bit_ceil ((unsigned _BitInt(__BITINT_MAXWIDTH__
)) 0) != 1)
919 if (__builtin_stdc_bit_ceil (~(unsigned _BitInt(__BITINT_MAXWIDTH__
)) 0) != 0)
921 if (__builtin_stdc_bit_ceil (((unsigned _BitInt(__BITINT_MAXWIDTH__
)) 1) << (__BITINT_MAXWIDTH__
- 1)) != ((unsigned _BitInt(__BITINT_MAXWIDTH__
)) 1) << (__BITINT_MAXWIDTH__
- 1))
923 if (__builtin_stdc_bit_ceil (((unsigned _BitInt(__BITINT_MAXWIDTH__
)) 512) << 405) != (((unsigned _BitInt(__BITINT_MAXWIDTH__
)) 512) << 405)
924 || __builtin_stdc_bit_ceil (((unsigned _BitInt(__BITINT_MAXWIDTH__
)) 513) << 405) != (((unsigned _BitInt(__BITINT_MAXWIDTH__
)) 1024) << 405))