From dd2a65b3501c4fd34507eef355c86d6fec272253 Mon Sep 17 00:00:00 2001 From: spop Date: Sun, 21 Aug 2005 10:59:15 +0000 Subject: PR tree-optimization/23433 * tree-chrec.c (chrec_apply): Translate INTEGER_CST to a REAL_CST when the type is SCALAR_FLOAT_TYPE_P. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103317 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree-chrec.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/tree-chrec.c') diff --git a/gcc/tree-chrec.c b/gcc/tree-chrec.c index 87cc148c1a7..8dae9167ef6 100644 --- a/gcc/tree-chrec.c +++ b/gcc/tree-chrec.c @@ -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". */ -- cgit v1.2.1