From b3e508d7a665c5fa5fcf4c0e4aaecb1a646595c9 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 19 May 2016 17:05:07 +0200 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/tree-ssa-reassoc.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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; } -- 2.30.2