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: PING: [PATCH gcc/ebitmap] fix for ebitmap_clear_bit()


Nicolas BENOIT <nbenoit@tuxfamily.org> writes:

> I discovered another issue with the cache reset, this patch fixes both.
>
> Issue 1 : The map->cacheindex compared against eltwordindex, which is
> irrelevant; discussed in the message mentioned above.
>
> Issue 2 : When the cache points to an element which is after the element
> being removed, it is not updated, although all the elements are going to
> be shifted in the array. Then, the cache points to the succeeding
> element it should point to.
>
> This patch fixes both issues :
> 1/ it uses the correct wordindex to compare cacheindex with.
> 2/ it makes the cache points one element backwards if the cached
> element is about to be shifted.
>
> I attached to this message two testcases for each issue.
> The first one is taken from issue 1 initial patch.
>
> By the way, patches
>
> http://gcc.gnu.org/ml/gcc-patches/2009-09/msg00956.html and
> http://gcc.gnu.org/ml/gcc-patches/2009-09/msg00959.html
>
> are still pending. I hope someone will have a look at them.

This patch is OK with a ChangeLog entry.

Thanks.

Ian


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