]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Another memory leak in vectorizable_store
authorRichard Biener <rguenther@suse.de>
Thu, 18 Jan 2024 13:55:49 +0000 (14:55 +0100)
committerRichard Biener <rguenther@suse.de>
Thu, 18 Jan 2024 15:07:34 +0000 (16:07 +0100)
Similar to the last one.

* tree-vect-stmts.cc (vectorizable_store): Do not pre-allocate
operands vector.

gcc/tree-vect-stmts.cc

index 69d76c3b350f6addd3a3d39797ff541f3aaa97de..09749ae38174eb5dddd8460c41d8a1d2277897ae 100644 (file)
@@ -8542,7 +8542,7 @@ vectorizable_store (vec_info *vinfo,
 
       alias_off = build_int_cst (ref_type, 0);
       stmt_vec_info next_stmt_info = first_stmt_info;
-      auto_vec<tree> vec_oprnds (ncopies);
+      auto_vec<tree> vec_oprnds;
       /* For costing some adjacent vector stores, we'd like to cost with
         the total number of them once instead of cost each one by one. */
       unsigned int n_adjacent_stores = 0;