1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-original" } */
3
4 int foo(unsigned int x)
5 {
6 return __builtin_popcount(x) & 1;
7 }
8
9 int fool(unsigned long x)
10 {
11 return __builtin_popcountl(x) & 1;
12 }
13
14 int fooll(unsigned long long x)
15 {
16 return __builtin_popcountll(x) & 1;
17 }
18
19 /* { dg-final { scan-tree-dump-times "__builtin_popcount" 0 "original" } } */
20 /* { dg-final { scan-tree-dump-times "__builtin_parity" 3 "original" } } */
21