On 02/03/2017 03:24 PM, Jakub Jelinek wrote:
Hi!

As mentioned in the PR, on the gfortran.dg/forall_7.f90 testcase
we leak memory starting with r239542.  vect_get_slp_defs allocates
a vector of vectors, elements corresponding to NULL in slp_ops
are .create (0) vectors that don't need freeing, but the rest
is safe_spliced into other vectors.  We need to release those
vectors afterwards, before the vector containing them is released.

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

2017-02-03  Jakub Jelinek  <ja...@redhat.com>

        PR tree-optimization/79340
        * tree-vect-loop.c (vectorizable_reduction): Release
        vec_defs elements after safe_splicing them into other vectors.
        Formatting fixes.
OK.
jeff

Reply via email to