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

On the gcc.dg/autopar/outer-4.c testcase we leak memory, because
vect_analyze_loop_form allocates vinfos for all the stmts in the loop
and when it calls vect_analyze_loop_form on the loop->inner before
the former is destroyed, we overwrite all those vinfo pointers for
stmts inside of the inner loop with newly allocated memory.

The following patch fixes that by making sure vect_analyze_loop_form
for the inner loop is only called after destroy_loop_vec_info
of the outer loop.

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

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

        PR tree-optimization/79338
        * tree-parloops.c (gather_scalar_reductions): Don't call
        vect_analyze_loop_form for loop->inner before destroying loop's
        loop_vinfo.
OK.
jeff

Reply via email to