This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix another leak and one uninitialized var read
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 22 Aug 2012 11:38:41 +0200
- Subject: [PATCH] Fix another leak and one uninitialized var read
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
Another leak and another uninitialized var.
Testing in progress, ok for trunk if it passes?
2012-08-22 Jakub Jelinek <jakub@redhat.com>
* tree-vect-loop.c (vect_transform_loop): Initialize
check_profitability to false.
* tree-predcom.c (try_combine_chains): Free the worklist vector
at the end.
--- gcc/tree-vect-loop.c.jj 2012-08-21 22:48:30.000000000 +0200
+++ gcc/tree-vect-loop.c 2012-08-22 11:35:54.901413507 +0200
@@ -5277,7 +5277,7 @@ vect_transform_loop (loop_vec_info loop_
gimple_seq pattern_def_seq = NULL;
gimple_stmt_iterator pattern_def_si = gsi_none ();
bool transform_pattern_stmt = false;
- bool check_profitability;
+ bool check_profitability = false;
int th;
if (vect_print_dump_info (REPORT_DETAILS))
--- gcc/tree-predcom.c.jj 2012-08-10 12:57:38.000000000 +0200
+++ gcc/tree-predcom.c 2012-08-22 11:21:23.314423304 +0200
@@ -2331,6 +2331,8 @@ try_combine_chains (VEC (chain_p, heap)
}
}
}
+
+ VEC_free (chain_p, heap, worklist);
}
/* Prepare initializers for CHAIN in LOOP. Returns false if this is
Jakub