diff options
author | Jan Hubicka <jh@suse.cz> | 2004-09-07 16:56:50 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2004-09-07 14:56:50 +0000 |
commit | 6b094f38d7561422c087a31d26a8d36b58d7a549 (patch) | |
tree | 9b2384fc9f06d399e81675e5cf03dd4d047da7a0 /gcc | |
parent | c8cc8542fa03e78ff3a39734f5dad49b233be54f (diff) | |
download | gcc-6b094f38d7561422c087a31d26a8d36b58d7a549.zip gcc-6b094f38d7561422c087a31d26a8d36b58d7a549.tar.gz gcc-6b094f38d7561422c087a31d26a8d36b58d7a549.tar.bz2 |
* tree-ssa-loop-ivopts.c (iv_value): Avoid invalid sharing on niter.
From-SVN: r87143
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/tree-ssa-loop-ivopts.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b5fd1d9..6d7e473 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2004-09-07 Jan Hubicka <jh@suse.cz> + + * tree-ssa-loop-ivopts.c (iv_value): Avoid invalid sharing on niter. + 2004-09-07 Nathan Sidwell <nathan@codesourcery.com> * builtins.c (fold_builtin_strchr): Use build_int_cst, not diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index 7234660..be4958d 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -2908,7 +2908,7 @@ iv_value (struct iv *iv, tree niter) tree type = TREE_TYPE (iv->base); niter = fold_convert (type, niter); - val = fold (build2 (MULT_EXPR, type, iv->step, niter)); + val = fold (build2 (MULT_EXPR, type, iv->step, unsave_expr_now (niter))); return fold (build2 (PLUS_EXPR, type, iv->base, val)); } |