Commit 3c0c8f9d by Sebastian Pop Committed by Sebastian Pop

re PR tree-optimization/23433 (ICE: tree check: expected real_cst, have…

re PR tree-optimization/23433 (ICE: tree check: expected real_cst, have integer_cst in const_binop, at fold-const.c:1512)

	PR tree-optimization/23433
        * tree-chrec.c (chrec_apply): Translate INTEGER_CST to a
        REAL_CST when the type is SCALAR_FLOAT_TYPE_P.

From-SVN: r103317
parent 00c59348
2005-08-21 Sebastian Pop <pop@cri.ensmp.fr> 2005-08-21 Sebastian Pop <pop@cri.ensmp.fr>
PR tree-optimization/23433
* tree-chrec.c (chrec_apply): Translate INTEGER_CST to a
REAL_CST when the type is SCALAR_FLOAT_TYPE_P.
2005-08-21 Sebastian Pop <pop@cri.ensmp.fr>
PR tree-optimization/23434 PR tree-optimization/23434
* tree-ssa-loop-niter.c (proved_non_wrapping_p): Give up when * tree-ssa-loop-niter.c (proved_non_wrapping_p): Give up when
the iteration bound is not an INTEGER_CST. the iteration bound is not an INTEGER_CST.
......
/* { dg-do compile } */
/* { dg-options "-O2" } */
double transport_sumexp(int numexp)
{
int k,j;
double xk1 = 1.0;
for(k=1; k<=numexp;k++)
for(j=1;j<=3;j++)
xk1 += 1.0;
return xk1;
}
...@@ -539,6 +539,9 @@ chrec_apply (unsigned var, ...@@ -539,6 +539,9 @@ chrec_apply (unsigned var,
if (dump_file && (dump_flags & TDF_DETAILS)) if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "(chrec_apply \n"); 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)) if (evolution_function_is_affine_p (chrec))
{ {
/* "{a, +, b} (x)" -> "a + b*x". */ /* "{a, +, b} (x)" -> "a + b*x". */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment