Fix leak in gcc/tree-ssa-reassoc.c.
authorMartin Liska <mliska@suse.cz>
Thu, 19 May 2016 15:05:07 +0000 (17:05 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Thu, 19 May 2016 15:05:07 +0000 (15:05 +0000)
* tree-ssa-reassoc.c (eliminate_duplicate_pair): Truncate
an auto_vec instead of re-creating it.

From-SVN: r236466

gcc/ChangeLog
gcc/tree-ssa-reassoc.c

index 569d238b96fe259cd85fb00b2992d479adea5a2b..6418c3e3f67882ed381f2cc3d470474f0ab690c6 100644 (file)
@@ -1,3 +1,8 @@
+2016-05-19  Martin Liska  <mliska@suse.cz>
+
+       * tree-ssa-reassoc.c (eliminate_duplicate_pair): Truncate
+       an auto_vec instead of re-creating it.
+
 2016-05-19  Martin Liska  <mliska@suse.cz>
 
        * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Use
index 3b5f36bf1e45c5ef7c9a5f7205394a002a99a72c..81b89777af1212a2fa06b42322b83cebd5f2bb44 100644 (file)
@@ -732,7 +732,7 @@ eliminate_duplicate_pair (enum tree_code opcode,
 
          if (ops->length () == 2)
            {
-             ops->create (0);
+             ops->truncate (0);
              add_to_ops_vec (ops, build_zero_cst (TREE_TYPE (last->op)));
              *all_done = true;
            }