This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/32144] [pointer_plus] Ice in chrec_fold_plus_poly_poly, at tree-chrec.c:110
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 May 2007 19:40:04 -0000
- Subject: [Bug tree-optimization/32144] [pointer_plus] Ice in chrec_fold_plus_poly_poly, at tree-chrec.c:110
- References: <bug-32144-14137@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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