[PATCH] Fix vect_supported_load_permutation_p memory leak (PR middle-end/56461)
Richard Biener
rguenther@suse.de
Tue Mar 5 09:07:00 GMT 2013
On Mon, 4 Mar 2013, Jakub Jelinek wrote:
> Hi!
>
> When returning true, load_index sbitmap is released, but not when returning
> false. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux,
> ok for trunk?
Ok.
Thanks,
Richard.
> 2013-03-04 Jakub Jelinek <jakub@redhat.com>
>
> PR middle-end/56461
> * tree-vect-slp.c (vect_supported_load_permutation_p): Free
> load_index sbitmap even if some bit in it isn't set.
>
> --- gcc/tree-vect-slp.c.jj 2013-02-28 22:19:57.000000000 +0100
> +++ gcc/tree-vect-slp.c 2013-03-04 15:01:48.441490311 +0100
> @@ -1429,7 +1429,10 @@ vect_supported_load_permutation_p (slp_i
>
> for (j = 0; j < group_size; j++)
> if (!bitmap_bit_p (load_index, j))
> - return false;
> + {
> + sbitmap_free (load_index);
> + return false;
> + }
>
> sbitmap_free (load_index);
>
>
> Jakub
>
>
--
Richard Biener <rguenther@suse.de>
SUSE / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746
GF: Jeff Hawn, Jennifer Guild, Felix Imend
More information about the Gcc-patches
mailing list