free_stmt_vec_info was releasing the LHS of a statement from the *wrong*
statement. Thankfully, the LHS it was actually releasing was just
released by some earlier code, so nothing bad happened (the name manager
explicitly allows multiple releases of the same node -- something we may
want to change).
As with prior patches in this series, I have a reduced testcase that
we'll try to utilize in some way.
Bootstrapped and regression tested on x86_64-linux-gnu. Installed on
the trunk.
Jeff
commit 3a8342175467d3f08385ee8e15089ec62a9ae4bd
Author: Jeff Law <l...@redhat.com>
Date: Fri Oct 9 10:33:09 2015 -0600
[PATCH] [6/n] Fix minor SSA_NAME leaks
* tree-vect-stmts.c (free_stmt_vec_info): Free the LHS of the
correct statement.
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 932253d..07195e5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-09 Jeff Law <l...@redhat.com>
+
+ * tree-vect-stmts.c (free_stmt_vec_info): Free the LHS of the
+ correct statement.
+
2015-10-09 Renlin Li <renlin...@arm.com>
* config/arm/neon.md (neon_vuzp<mode>_insn): Add & modifier for
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 8961dda..0073ddb 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -8075,7 +8075,7 @@ free_stmt_vec_info (gimple *stmt)
{
gimple *seq_stmt = gsi_stmt (si);
gimple_set_bb (seq_stmt, NULL);
- lhs = gimple_get_lhs (patt_stmt);
+ lhs = gimple_get_lhs (seq_stmt);
if (TREE_CODE (lhs) == SSA_NAME)
release_ssa_name (lhs);
free_stmt_vec_info (seq_stmt);