diff options
author | David Malcolm <dmalcolm@redhat.com> | 2014-12-01 17:16:04 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2014-12-01 17:16:04 +0000 |
commit | 9370adeb9da5071af3685adbd697784bdd349cc9 (patch) | |
tree | 2639c85d255f2ead787a56eafbf7fcf7b8f51bdb /gcc | |
parent | dc706721e6e9f2c6c15469c4e65a8f5c64276ec1 (diff) | |
download | gcc-9370adeb9da5071af3685adbd697784bdd349cc9.zip gcc-9370adeb9da5071af3685adbd697784bdd349cc9.tar.gz gcc-9370adeb9da5071af3685adbd697784bdd349cc9.tar.bz2 |
PR jit/63854: Fix leak in tree-ssa-math-opts.c
gcc/ChangeLog:
PR jit/63854
* tree-ssa-math-opts.c (execute_cse_sincos_1): Fix a missing
release of stmts by converting it to an auto_vec.
From-SVN: r218230
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-ssa-math-opts.c | 9 |
2 files changed, 8 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 695bfd1..6063549 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-12-01 David Malcolm <dmalcolm@redhat.com> + + PR jit/63854 + * tree-ssa-math-opts.c (execute_cse_sincos_1): Fix a missing + release of stmts by converting it to an auto_vec. + 2014-12-01 Richard Biener <rguenther@suse.de> * Makefile.in (gimple-match.o-warn): Use -Wno-unused instead of diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c index 4b95ee4..1ed2838 100644 --- a/gcc/tree-ssa-math-opts.c +++ b/gcc/tree-ssa-math-opts.c @@ -740,7 +740,7 @@ execute_cse_sincos_1 (tree name) tree fndecl, res, type; gimple def_stmt, use_stmt, stmt; int seen_cos = 0, seen_sin = 0, seen_cexpi = 0; - vec<gimple> stmts = vNULL; + auto_vec<gimple> stmts; basic_block top_bb = NULL; int i; bool cfg_changed = false; @@ -773,10 +773,7 @@ execute_cse_sincos_1 (tree name) } if (seen_cos + seen_sin + seen_cexpi <= 1) - { - stmts.release (); - return false; - } + return false; /* Simply insert cexpi at the beginning of top_bb but not earlier than the name def statement. */ @@ -835,8 +832,6 @@ execute_cse_sincos_1 (tree name) cfg_changed = true; } - stmts.release (); - return cfg_changed; } |