http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54409
--- Comment #11 from Martin Jambor <jamborm at gcc dot gnu.org> 2012-08-31 17:15:52 UTC --- (In reply to comment #10) > This commit or the previous one caused a lot of ICEs (see > http://gcc.gnu.org/ml/gcc-testresults/2012-08/msg02988.html): > > /opt/gcc/work/gcc/testsuite/gfortran.dg/bound_7.f90: In function 'MAIN__': > /opt/gcc/work/gcc/testsuite/gfortran.dg/bound_7.f90:168:0: internal compiler > error: vector VEC(T,base) replace domain error, in predicate_for_phi_result at > ipa-inline-analysis.c:2164 > call sub2 > ^ It was the previous one, either calculate_dominance_info or loop_optimizer_init grow SSANAMES of a function which I did not expect. I'm sorry, I do not know what went wring when I was testing the patches. I'm bootstrapping a simple fix: 2012-08-31 Martin Jambor <mjam...@suse.cz> * ipa-inline-analysis.c (estimate_function_body_sizes): Allocate nonconstant_names after calculate_dominance_info and loop_optimizer_init. Index: src/gcc/ipa-inline-analysis.c =================================================================== --- src.orig/gcc/ipa-inline-analysis.c +++ src/gcc/ipa-inline-analysis.c @@ -2185,13 +2185,6 @@ estimate_function_body_sizes (struct cgr struct ipa_node_params *parms_info = NULL; VEC (predicate_t, heap) *nonconstant_names = NULL; - if (ipa_node_params_vector && !early && optimize) - { - parms_info = IPA_NODE_REF (node); - VEC_safe_grow_cleared (predicate_t, heap, nonconstant_names, - VEC_length (tree, SSANAMES (my_function))); - } - info->conds = 0; info->entry = 0; @@ -2199,6 +2192,13 @@ estimate_function_body_sizes (struct cgr { calculate_dominance_info (CDI_DOMINATORS); loop_optimizer_init (LOOPS_NORMAL | LOOPS_HAVE_RECORDED_EXITS); + + if (ipa_node_params_vector) + { + parms_info = IPA_NODE_REF (node); + VEC_safe_grow_cleared (predicate_t, heap, nonconstant_names, + VEC_length (tree, SSANAMES (my_function))); + } } if (dump_file)