This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix bitmap_last_set_bit


On Wed, Sep 5, 2012 at 10:40 PM, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
> Hi,
>
> bitmap.c:bitmap_last_set_bit() is not used by any code in the current
> GCC trunk, but I'm using it and I noticed it returns an incorrect
> result. This patch rewrites most of the function to return the correct
> result.
>
> Not sure how to test this other than to say that my code, that uses
> this function, works with the patch and breaks without it. I've also
> unleashed bitmap_last_set_bit (and bitmap_first_set_bit) on a large
> number of randomly generated bitmaps and rather expensive verification
> code that doesn't accept the results of the pre-patch
> bitmap_last_set_bit and is happy with my new implementation.
>
> OK for trunk?

Ok.

Thanks,
Richard.

> Ciao!
> Steven
>
>         * bitmap.c (bitmap_last_set_bit): Rewrite to return the correct bit.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]