This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 2/9] Fix leak in tree-ssa-loop-prefetch.c
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: marxin <mliska at suse dot cz>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 19 May 2016 13:15:48 +0200
- Subject: Re: [PATCH 2/9] Fix leak in tree-ssa-loop-prefetch.c
- Authentication-results: sourceware.org; auth=none
- References: <cover dot 1463654693 dot git dot mliska at suse dot cz> <98d51ac7b0fc33a8fc5ed4a6d37b8c496cd75676 dot 1463654693 dot git dot mliska at suse dot cz>
On Thu, May 19, 2016 at 12:44 PM, marxin <mliska@suse.cz> wrote:
> This fixes memory leak which can be e.g. for
> 20020122-2.c -fno-diagnostics-show-caret -fdiagnostics-color=never -O2 -fprefetch-loop-arrays.
Ok.
Richard.
> gcc/ChangeLog:
>
> 2016-05-18 Martin Liska <mliska@suse.cz>
>
> * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Use
> auto_vec instead of vec.
> ---
> gcc/tree-ssa-loop-prefetch.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/tree-ssa-loop-prefetch.c b/gcc/tree-ssa-loop-prefetch.c
> index c054c60..49fd597 100644
> --- a/gcc/tree-ssa-loop-prefetch.c
> +++ b/gcc/tree-ssa-loop-prefetch.c
> @@ -1546,7 +1546,7 @@ determine_loop_nest_reuse (struct loop *loop, struct mem_ref_group *refs,
> vec<ddr_p> dependences = vNULL;
> struct mem_ref_group *gr;
> struct mem_ref *ref, *refb;
> - vec<loop_p> vloops = vNULL;
> + auto_vec<loop_p> vloops;
> unsigned *loop_data_size;
> unsigned i, j, n;
> unsigned volume, dist, adist;
> --
> 2.8.2
>
>