--- numpy-1.20.2.orig/numpy/distutils/checks/cpu_popcnt.c 2021-05-22 20:31:45.847812877 -0700 +++ numpy-1.20.2.orig/numpy/distutils/checks/cpu_popcnt.c 2021-05-22 20:32:02.157026731 -0700 @@ -4,20 +4,26 @@ #include #endif +#include + int main(void) { long long a = 0; int b; + + a = random(); + b = random(); + #ifdef _MSC_VER #ifdef _M_X64 - a = _mm_popcnt_u64(1); + a = _mm_popcnt_u64(a); #endif - b = _mm_popcnt_u32(1); + b = _mm_popcnt_u32(b); #else #ifdef __x86_64__ - a = __builtin_popcountll(1); + a = __builtin_popcountll(a); #endif - b = __builtin_popcount(a); + b = __builtin_popcount(b); #endif return (int)a + b; }