Hi.

Following simple patch fixes a newly introduced memory leak.

Patch survives regression tests and bootstraps on x86_64-linux.

Ready from trunk?
Thanks,
Martin
>From a2e6be16d7079b744db4d383b8317226ab53ff58 Mon Sep 17 00:00:00 2001
From: marxin <mli...@suse.cz>
Date: Fri, 17 Jun 2016 12:26:58 +0200
Subject: [PATCH] Fix memory leak in tree-ssa-reassoc.c

gcc/ChangeLog:

2016-06-17  Martin Liska  <mli...@suse.cz>

	* tree-ssa-reassoc.c (transform_add_to_multiply): Use auto_vec.
---
 gcc/tree-ssa-reassoc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c
index e32d503..cdfe06f 100644
--- a/gcc/tree-ssa-reassoc.c
+++ b/gcc/tree-ssa-reassoc.c
@@ -1807,7 +1807,7 @@ transform_add_to_multiply (vec<operand_entry *> *ops)
   tree op = NULL_TREE;
   int j;
   int i, start = -1, end = 0, count = 0;
-  vec<std::pair <int, int> > indxs = vNULL;
+  auto_vec<std::pair <int, int> > indxs;
   bool changed = false;
 
   if (!INTEGRAL_TYPE_P (TREE_TYPE ((*ops)[0]->op))
-- 
2.8.3

Reply via email to