diff options
author | Martin Liska <mliska@suse.cz> | 2016-05-06 16:26:23 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2016-05-06 14:26:23 +0000 |
commit | 734c152691823eb7a12855783b67d738bd1cf701 (patch) | |
tree | 040340d59b50ec6295923f5b990bb7878e8ae455 /gcc/tree-if-conv.c | |
parent | 9bdf001b7a2232753e4a92582218bb4f24c8d809 (diff) | |
download | gcc-734c152691823eb7a12855783b67d738bd1cf701.zip gcc-734c152691823eb7a12855783b67d738bd1cf701.tar.gz gcc-734c152691823eb7a12855783b67d738bd1cf701.tar.bz2 |
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
Diffstat (limited to 'gcc/tree-if-conv.c')
-rw-r--r-- | gcc/tree-if-conv.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index 3d7c613..3ad8e87 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<edge> critical_edges = vNULL; + auto_vec<edge> 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)) |