[AArch64/arm] PR testsuite/85326 Avoid C++ tests when C++ compiler not present
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / popcnt.c
blob7e957966d8e81b8633a444bb42944d0da82ae5db
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
4 int
5 foo (int x)
7 return __builtin_popcount (x);
10 long
11 foo1 (long x)
13 return __builtin_popcountl (x);
16 long long
17 foo2 (long long x)
19 return __builtin_popcountll (x);
22 /* { dg-final { scan-assembler-not "popcount" } } */
23 /* { dg-final { scan-assembler-times "cnt\t" 3 } } */