Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / fold-parity-5.c
blob69d3a6a54ca7b39e63e8bfb1434bcab3501d2d40
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
4 int test_and4(unsigned int a)
6 return __builtin_parity(a&4);
9 int test_and4l(unsigned long b)
11 return __builtin_parityl(b&4);
14 int test_and4ll(unsigned long long c)
16 return __builtin_parityll(c&4);
19 int test_shift(unsigned int d)
21 int bits = 8*sizeof(unsigned int)-1;
22 return __builtin_parity(d<<31);
25 int test_shiftl(unsigned long e)
27 int bits = 8*sizeof(unsigned long)-1;
28 return __builtin_parityl(e<<bits);
31 int test_shiftll(unsigned long long f)
33 int bits = 8*sizeof(unsigned long long)-1;
34 return __builtin_parityll(f<<bits);
37 /* { dg-final { scan-tree-dump-times "parity" 0 "optimized" } } */