From: Martin Liska Date: Fri, 6 May 2016 14:26:23 +0000 (+0200) Subject: Fix memory leak in tree-if-conv.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=734c152691823eb7a12855783b67d738bd1cf701;p=gcc.git Fix memory leak in tree-if-conv.c * tree-if-conv.c (ifcvt_split_critical_edges): Use auto_vec instead of vec as the vector is local to the function. From-SVN: r235974 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1fbc350addf..6593023843e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-05-06 Martin Liska + + * tree-if-conv.c (ifcvt_split_critical_edges): Use auto_vec + instead of vec as the vector is local to the function. + 2016-05-06 Jakub Jelinek * config/i386/sse.md (*v8hi3, *v16qi3): Add diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index 3d7c613dc9c..3ad8e8701ed 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -2361,7 +2361,7 @@ ifcvt_split_critical_edges (struct loop *loop, bool aggressive_if_conv) gimple *stmt; edge e; edge_iterator ei; - vec critical_edges = vNULL; + auto_vec critical_edges; /* Loop is not well formed. */ if (num <= 2 || loop->inner || !single_exit (loop)) @@ -2381,7 +2381,6 @@ ifcvt_split_critical_edges (struct loop *loop, bool aggressive_if_conv) bb->index, MAX_PHI_ARG_NUM); free (body); - critical_edges.release (); return false; } if (bb == loop->latch || bb_with_exit_edge_p (loop, bb))