SOURCES (GCC_4_1): gcc-pr27603.patch (NEW) - critical fix.

pluto pluto at pld-linux.org
Tue May 16 12:23:22 CEST 2006


Author: pluto                        Date: Tue May 16 10:23:22 2006 GMT
Module: SOURCES                       Tag: GCC_4_1
---- Log message:
- critical fix.

---- Files affected:
SOURCES:
   gcc-pr27603.patch (NONE -> 1.1.2.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/gcc-pr27603.patch
diff -u /dev/null SOURCES/gcc-pr27603.patch:1.1.2.1
--- /dev/null	Tue May 16 12:23:22 2006
+++ SOURCES/gcc-pr27603.patch	Tue May 16 12:23:17 2006
@@ -0,0 +1,28 @@
+--- gcc-4_1-branch/gcc/tree-ssa-loop-niter.c	(wersja 113819)
++++ gcc-4_1-branch/gcc/tree-ssa-loop-niter.c	(wersja 113820)
+@@ -1562,15 +1562,20 @@
+ 
+ 		    utype = unsigned_type_for (type);
+ 		    if (tree_int_cst_lt (step, integer_zero_node))
+-		      diff = fold_build2 (MINUS_EXPR, utype, init,
++		      diff = fold_build2 (MINUS_EXPR, type, init,
+ 					  TYPE_MIN_VALUE (type));
+ 		    else
+-		      diff = fold_build2 (MINUS_EXPR, utype,
++		      diff = fold_build2 (MINUS_EXPR, type,
+ 					  TYPE_MAX_VALUE (type), init);
+ 
+-		    estimation = fold_build2 (CEIL_DIV_EXPR, utype, diff,
+-					      step);
+-		    record_estimate (loop, estimation, boolean_true_node, stmt);
++		    if (integer_nonzerop (step))
++		      {
++			estimation = fold_build2 (CEIL_DIV_EXPR, type, diff,
++						  step);
++			record_estimate (loop,
++					 fold_convert (utype, estimation),
++					 boolean_true_node, stmt);
++		      }
+ 		  }
+ 
+ 		break;
================================================================


More information about the pld-cvs-commit mailing list