aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDaniel Berlin <dberlin@dberlin.org>2005-06-11 15:28:35 +0000
committerDaniel Berlin <dberlin@gcc.gnu.org>2005-06-11 15:28:35 +0000
commite4d693c1c2779987e12feafc1f562ed06e4ff9b4 (patch)
treeecd41cf23586534e266f301075d6c6e878d7c804 /gcc
parente8f927317c52a165b5d446cf33841f95e04b0d39 (diff)
downloadgcc-e4d693c1c2779987e12feafc1f562ed06e4ff9b4.zip
gcc-e4d693c1c2779987e12feafc1f562ed06e4ff9b4.tar.gz
gcc-e4d693c1c2779987e12feafc1f562ed06e4ff9b4.tar.bz2
lambda-code.c (replace_uses_equiv_to_x_with_y): Verify the step is an INTEGER_CST before calling int_cst_value.
2005-06-11 Daniel Berlin <dberlin@dberlin.org> * lambda-code.c (replace_uses_equiv_to_x_with_y): Verify the step is an INTEGER_CST before calling int_cst_value. From-SVN: r100839
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/lambda-code.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7d6fc6a..87a50ca 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2005-06-11 Daniel Berlin <dberlin@dberlin.org>
+
+ * lambda-code.c (replace_uses_equiv_to_x_with_y): Verify the step
+ is an INTEGER_CST before calling int_cst_value.
+
2005-06-10 Uros Bizjak <uros@kss-loka.si>
PR target/21981
diff --git a/gcc/lambda-code.c b/gcc/lambda-code.c
index 6dbbe6d..c649d18 100644
--- a/gcc/lambda-code.c
+++ b/gcc/lambda-code.c
@@ -2184,7 +2184,9 @@ replace_uses_equiv_to_x_with_y (struct loop *loop, tree stmt, tree x,
(loop, analyze_scalar_evolution (loop, use));
if (access_fn != NULL_TREE && access_fn != chrec_dont_know)
step = evolution_part_in_loop_num (access_fn, loop->num);
- if ((step && step != chrec_dont_know && int_cst_value (step) == xstep)
+ if ((step && step != chrec_dont_know
+ && TREE_CODE (step) == INTEGER_CST
+ && int_cst_value (step) == xstep)
|| USE_FROM_PTR (use_p) == x)
SET_USE (use_p, y);
}