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/23433] [4.1 Regression] ICE: tree check: expected real_cst, have integer_cst in const_binop, at fold-const.c:1512


------- Additional Comments From sebastian dot pop at cri dot ensmp dot fr  2005-08-17 23:23 -------
Subject: Re:  [4.1 Regression] ICE: tree check: expected real_cst, have integer_cst in const_binop, at fold-const.c:1512

I'm testing this patch on amd64 and i686.  I will commit it once
validated.

Index: tree-chrec.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-chrec.c,v
retrieving revision 2.24
diff -d -u -p -r2.24 tree-chrec.c
--- tree-chrec.c	15 Aug 2005 12:26:07 -0000	2.24
+++ tree-chrec.c	17 Aug 2005 23:01:09 -0000
@@ -539,6 +539,9 @@ chrec_apply (unsigned var,
   if (dump_file && (dump_flags & TDF_DETAILS))
     fprintf (dump_file, "(chrec_apply \n");
 
+  if (TREE_CODE (x) == INTEGER_CST && SCALAR_FLOAT_TYPE_P (type))
+    x = build_real_from_int_cst (type, x);
+
   if (evolution_function_is_affine_p (chrec))
     {
       /* "{a, +, b} (x)"  ->  "a + b*x".  */


-- 


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


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