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/32167] [pointer_plus] Ice in compare_values_warnv, at tree-vrp.c:760



------- 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


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