From 0766b9ab92133db3262da6e2a7d8d9e8ea9ec742 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Fri, 17 Jun 2016 20:05:56 +0200 Subject: [PATCH] Fix memory leak in tree-ssa-reassoc.c * tree-ssa-reassoc.c (transform_add_to_multiply): Use auto_vec. From-SVN: r237559 --- gcc/ChangeLog | 4 ++++ gcc/tree-ssa-reassoc.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a93464d33a7..42850c61b44 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2016-06-17 Martin Liska + + * tree-ssa-reassoc.c (transform_add_to_multiply): Use auto_vec. + 2016-06-17 Martin Liska * predict.def: PRED_LOOP_EXIT from 92 to 85. diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c index e32d503bfef..cdfe06fbfae 100644 --- a/gcc/tree-ssa-reassoc.c +++ b/gcc/tree-ssa-reassoc.c @@ -1807,7 +1807,7 @@ transform_add_to_multiply (vec *ops) tree op = NULL_TREE; int j; int i, start = -1, end = 0, count = 0; - vec > indxs = vNULL; + auto_vec > indxs; bool changed = false; if (!INTEGRAL_TYPE_P (TREE_TYPE ((*ops)[0]->op)) -- 2.30.2