From: Martin Liska Date: Thu, 19 May 2016 15:05:07 +0000 (+0200) Subject: Fix leak in gcc/tree-ssa-reassoc.c. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b3e508d7a665c5fa5fcf4c0e4aaecb1a646595c9;p=gcc.git Fix leak in gcc/tree-ssa-reassoc.c. * tree-ssa-reassoc.c (eliminate_duplicate_pair): Truncate an auto_vec instead of re-creating it. From-SVN: r236466 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 569d238b96f..6418c3e3f67 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-05-19 Martin Liska + + * tree-ssa-reassoc.c (eliminate_duplicate_pair): Truncate + an auto_vec instead of re-creating it. + 2016-05-19 Martin Liska * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Use diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c index 3b5f36bf1e4..81b89777af1 100644 --- a/gcc/tree-ssa-reassoc.c +++ b/gcc/tree-ssa-reassoc.c @@ -732,7 +732,7 @@ eliminate_duplicate_pair (enum tree_code opcode, if (ops->length () == 2) { - ops->create (0); + ops->truncate (0); add_to_ops_vec (ops, build_zero_cst (TREE_TYPE (last->op))); *all_done = true; }