Hi.

This is simple follow-up of the previous patch that fixes last remaining
leak in vectorizer.

Patch can regbootstrap on x64_64-linux-gnu.

Ready for trunk?
Martin
>From 0d61420eb49dec0f5d14108373a546a8f1b52571 Mon Sep 17 00:00:00 2001
From: marxin <mli...@suse.cz>
Date: Wed, 9 Dec 2015 10:14:00 +0100
Subject: [PATCH] Fix memory leaks in tree-vect-data-refs.c

gcc/ChangeLog:

2015-12-09  Martin Liska  <mli...@suse.cz>

	* tree-vect-data-refs.c: Free an overwritten dataref.
---
 gcc/tree-vect-data-refs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index 8810af1..4c566c8 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -3847,6 +3847,7 @@ again:
 	      return false;
 	    }
 
+	  free_data_ref (datarefs[i]);
 	  datarefs[i] = dr;
 	  STMT_VINFO_GATHER_SCATTER_P (stmt_info) = gatherscatter;
 	}
-- 
2.6.3

Reply via email to