aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-chrec.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-04-11 14:04:00 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-04-11 14:04:00 +0000
commit754870ed779d39b573295a04dc559542e7bcabf3 (patch)
tree2ef6199ab21d5100ae3c9462c2fefb73040fea00 /gcc/tree-chrec.c
parent405af656bcbddb0f655aa7744220478b80df09d7 (diff)
downloadgcc-754870ed779d39b573295a04dc559542e7bcabf3.zip
gcc-754870ed779d39b573295a04dc559542e7bcabf3.tar.gz
gcc-754870ed779d39b573295a04dc559542e7bcabf3.tar.bz2
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 <rguenther@suse.de> 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
Diffstat (limited to 'gcc/tree-chrec.c')
-rw-r--r--gcc/tree-chrec.c6
1 files changed, 6 insertions, 0 deletions
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;
}