Hi!

split_data_refs_to_components used the name_expansions affine cache
through determine_offset, and since my patch uses it even more often,
but if it returns NULL, we don't free the cache and it can contain garbage
next time we perform tree_predictive_commoning_loop.

Bootstrapped/regtested on x86_64-linux and i686-linux, committed
to trunk as obvious.  No testcase for testsuite, as it is pretty
random if we ICE or not, e.g. stage1 f951 doesn't ICE, but stage2/3 did.

2014-01-10  Jakub Jelinek  <ja...@redhat.com>

        PR tree-optimization/59745
        * tree-predcom.c (tree_predictive_commoning_loop): Call
        free_affine_expand_cache if giving up because components is NULL.

--- gcc/tree-predcom.c.jj       2014-01-07 08:48:34.000000000 +0100
+++ gcc/tree-predcom.c  2014-01-10 10:08:04.476340865 +0100
@@ -2447,6 +2447,7 @@ tree_predictive_commoning_loop (struct l
   if (!components)
     {
       free_data_refs (datarefs);
+      free_affine_expand_cache (&name_expansions);
       return false;
     }
 

        Jakub

Reply via email to