From: Jan Hubicka Date: Tue, 7 Sep 2004 14:56:50 +0000 (+0200) Subject: * tree-ssa-loop-ivopts.c (iv_value): Avoid invalid sharing on niter. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6b094f38d7561422c087a31d26a8d36b58d7a549;p=gcc.git * tree-ssa-loop-ivopts.c (iv_value): Avoid invalid sharing on niter. From-SVN: r87143 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b5fd1d9aa1a..6d7e47306dc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2004-09-07 Jan Hubicka + + * tree-ssa-loop-ivopts.c (iv_value): Avoid invalid sharing on niter. + 2004-09-07 Nathan Sidwell * 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 7234660412b..be4958d2a79 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)); }