This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/32144] [pointer_plus] Ice in chrec_fold_plus_poly_poly, at tree-chrec.c:110



------- Comment #4 from pinskia at gcc dot gnu dot org  2007-05-29 19:40 -------
The fix:
Index: ../../gcc/tree-chrec.c
===================================================================
--- ../../gcc/tree-chrec.c      (revision 125151)
+++ ../../gcc/tree-chrec.c      (working copy)
@@ -107,7 +107,10 @@ chrec_fold_plus_poly_poly (enum tree_cod
   gcc_assert (poly1);
   gcc_assert (TREE_CODE (poly0) == POLYNOMIAL_CHREC);
   gcc_assert (TREE_CODE (poly1) == POLYNOMIAL_CHREC);
-  gcc_assert (chrec_type (poly0) == chrec_type (poly1));
+  if (POINTER_TYPE_P (chrec_type (poly0)))
+    gcc_assert (chrec_type (poly1) == sizetype);
+  else
+    gcc_assert (chrec_type (poly0) == chrec_type (poly1));
   gcc_assert (type == chrec_type (poly0));

   /*


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32144


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]