This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix a typo in sparseset_pop
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Carrot Wei <carrot at google dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 24 Feb 2014 09:55:33 +0100
- Subject: Re: [PATCH] Fix a typo in sparseset_pop
- Authentication-results: sourceware.org; auth=none
- References: <CAEe8uEDpJXgrD0W9C1O1=xe8oqzGep9b9AdgT_k+xn8BZMWdjg at mail dot gmail dot com>
On Mon, Feb 24, 2014 at 6:52 AM, Carrot Wei <carrot@google.com> wrote:
> Hi
>
> The following patch fixes an obvious wrong index used to access the
> dense array. The patch has passed the bootstrap and regression tests
> on x86-64.
>
> OK for trunk?
Ok.
Thanks,
Richard.
> thanks
> Carrot
>
>
> 2014-02-23 Guozhi Wei <carrot@google.com>
>
> * sparseset.h (sparseset_pop): Fix the wrong index.
>
>
> Index: sparseset.h
> ===================================================================
> --- sparseset.h (revision 208039)
> +++ sparseset.h (working copy)
> @@ -177,7 +177,7 @@
> gcc_checking_assert (mem != 0);
>
> s->members = mem - 1;
> - return s->dense[mem];
> + return s->dense[s->members];
> }
>
> static inline void