From 754870ed779d39b573295a04dc559542e7bcabf3 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Wed, 11 Apr 2012 14:04:00 +0000 Subject: re PR middle-end/52621 (ICE with -O3 -march=opteron in initialize_matrix_A, at tree-data-ref.c:1964) 2012-04-11 Richard Guenther PR middle-end/52621 * tree-chrec.c (evolution_function_is_invariant_rec_p): Properly consider loop nesting. (evolution_function_is_univariate_p): Properly check the remainder for chrecs. * gfortran.dg/pr52621.f90: New testcase. From-SVN: r186321 --- gcc/tree-chrec.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/tree-chrec.c') diff --git a/gcc/tree-chrec.c b/gcc/tree-chrec.c index fbd61c0..38dca4a 100644 --- a/gcc/tree-chrec.c +++ b/gcc/tree-chrec.c @@ -1011,6 +1011,8 @@ evolution_function_is_invariant_rec_p (tree chrec, int loopnum) if (TREE_CODE (chrec) == POLYNOMIAL_CHREC) { if (CHREC_VARIABLE (chrec) == (unsigned) loopnum + || flow_loop_nested_p (get_loop (loopnum), + get_loop (CHREC_VARIABLE (chrec))) || !evolution_function_is_invariant_rec_p (CHREC_RIGHT (chrec), loopnum) || !evolution_function_is_invariant_rec_p (CHREC_LEFT (chrec), @@ -1114,6 +1116,8 @@ evolution_function_is_univariate_p (const_tree chrec) break; default: + if (tree_contains_chrecs (CHREC_LEFT (chrec), NULL)) + return false; break; } @@ -1127,6 +1131,8 @@ evolution_function_is_univariate_p (const_tree chrec) break; default: + if (tree_contains_chrecs (CHREC_RIGHT (chrec), NULL)) + return false; break; } -- cgit v1.1