https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25671

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note there is a bug in the original testcase.
It should be:

int test_bit(unsigned long *words, int bit)
{
    int wsize = (sizeof *words) * 8;
    return (words[bit / wsize] & (1ul << (bit % wsize))) != 0;
}

if int is 32bit and long is 64bit, you would have gotten the wrong result.

Reply via email to