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 7/9] Fix memory leak in tree-if-conv.c


On Thu, May 19, 2016 at 12:44 PM, marxin <mliska@suse.cz> wrote:
> Leak can be seen e.g. here:
> gcc i386/pr50482.c -fno-diagnostics-show-caret -fdiagnostics-color=never -O3 -msse4

Ok.

Richard.

> gcc/ChangeLog:
>
> 2016-05-18  Martin Liska  <mliska@suse.cz>
>
>         * tree-if-conv.c (ifcvt_repair_bool_pattern): Utilize auto_vecs.
> ---
>  gcc/tree-if-conv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
> index c38e21b..8dc9a43 100644
> --- a/gcc/tree-if-conv.c
> +++ b/gcc/tree-if-conv.c
> @@ -2651,8 +2651,8 @@ ifcvt_repair_bool_pattern (basic_block bb)
>    tree rhs;
>    gimple *stmt;
>    gimple_stmt_iterator gsi;
> -  vec<gimple *> defuse_list = vNULL;
> -  vec<gimple *> pattern_roots = vNULL;
>
> +  auto_vec<gimple *> defuse_list;
> +  auto_vec<gimple *> pattern_roots;
>    bool repeat = true;
>    int niter = 0;
>    unsigned int ix;
> --
> 2.8.2
>
>


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