Fix memory leak in vectorizable_store
The following fixes a memory leak in vectorizable_store which happens because the functions populating gvec_oprnds[i] will call .create () on the incoming vector, leaking what we've previously allocated. * tree-vect-stmts.cc (vectorizable_store): Do not allocate storage for gvec_oprnds elements.
This commit is contained in:
parent
f2872e00f6
commit
5b421c2a5b
1 changed files with 1 additions and 1 deletions
|
@ -8772,7 +8772,7 @@ vectorizable_store (vec_info *vinfo,
|
|||
tree vec_mask = NULL;
|
||||
auto_delete_vec<auto_vec<tree>> gvec_oprnds (group_size);
|
||||
for (i = 0; i < group_size; i++)
|
||||
gvec_oprnds.quick_push (new auto_vec<tree> (ncopies));
|
||||
gvec_oprnds.quick_push (new auto_vec<tree> ());
|
||||
|
||||
if (memory_access_type == VMAT_LOAD_STORE_LANES)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue