From f6b8cbb70e8fcc1ddaa2963c931933c93c5918ef Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 19 May 2016 17:06:47 +0200 Subject: [PATCH] Fix memory leak in tree-if-conv.c * tree-if-conv.c (ifcvt_repair_bool_pattern): Utilize auto_vecs. From-SVN: r236470 --- gcc/ChangeLog | 4 ++++ gcc/tree-if-conv.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index effe9c31a7f..1e78e4bbc19 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2016-05-19 Martin Liska + + * tree-if-conv.c (ifcvt_repair_bool_pattern): Utilize auto_vecs. + 2016-05-19 Martin Liska * ipa-pure-const.c (set_function_state): Remove an existing diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index c38e21b32ce..8dc9a430f90 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -2651,8 +2651,8 @@ ifcvt_repair_bool_pattern (basic_block bb) tree rhs; gimple *stmt; gimple_stmt_iterator gsi; - vec defuse_list = vNULL; - vec pattern_roots = vNULL; + auto_vec defuse_list; + auto_vec pattern_roots; bool repeat = true; int niter = 0; unsigned int ix; -- 2.30.2