]> git.pld-linux.org Git - packages/gcc.git/blob - gcc-pr27603.patch
- critical fix.
[packages/gcc.git] / gcc-pr27603.patch
1 --- gcc-4_1-branch/gcc/tree-ssa-loop-niter.c    (wersja 113819)
2 +++ gcc-4_1-branch/gcc/tree-ssa-loop-niter.c    (wersja 113820)
3 @@ -1562,15 +1562,20 @@
4  
5                     utype = unsigned_type_for (type);
6                     if (tree_int_cst_lt (step, integer_zero_node))
7 -                     diff = fold_build2 (MINUS_EXPR, utype, init,
8 +                     diff = fold_build2 (MINUS_EXPR, type, init,
9                                           TYPE_MIN_VALUE (type));
10                     else
11 -                     diff = fold_build2 (MINUS_EXPR, utype,
12 +                     diff = fold_build2 (MINUS_EXPR, type,
13                                           TYPE_MAX_VALUE (type), init);
14  
15 -                   estimation = fold_build2 (CEIL_DIV_EXPR, utype, diff,
16 -                                             step);
17 -                   record_estimate (loop, estimation, boolean_true_node, stmt);
18 +                   if (integer_nonzerop (step))
19 +                     {
20 +                       estimation = fold_build2 (CEIL_DIV_EXPR, type, diff,
21 +                                                 step);
22 +                       record_estimate (loop,
23 +                                        fold_convert (utype, estimation),
24 +                                        boolean_true_node, stmt);
25 +                     }
26                   }
27  
28                 break;
This page took 0.037312 seconds and 4 git commands to generate.