This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/32167] [pointer_plus] Ice in compare_values_warnv, at tree-vrp.c:760
- 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: 31 May 2007 22:43:47 -0000
- Subject: [Bug tree-optimization/32167] [pointer_plus] Ice in compare_values_warnv, at tree-vrp.c:760
- References: <bug-32167-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-31 22:43 -------
Simple fix:
Index: tree-chrec.c
===================================================================
--- tree-chrec.c (revision 125239)
+++ tree-chrec.c (working copy)
@@ -344,9 +344,9 @@ chrec_fold_plus (tree type,
return chrec_fold_automatically_generated_operands (op0, op1);
if (integer_zerop (op0))
- return op1;
+ return chrec_convert (type, op1, NULL_TREE);
if (integer_zerop (op1))
- return op0;
+ return chrec_convert (type, op0, NULL_TREE);
if (POINTER_TYPE_P (type))
code = POINTER_PLUS_EXPR;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32167