diff options
author | Sebastian Pop <pop@cri.ensmp.fr> | 2005-08-21 12:59:15 +0200 |
---|---|---|
committer | Sebastian Pop <spop@gcc.gnu.org> | 2005-08-21 10:59:15 +0000 |
commit | 3c0c8f9dff5c2fd1e71fcbc5c05a65a33caa0303 (patch) | |
tree | d097feb94c994e2b67ffb22d4d80271209456b40 /gcc/tree-chrec.c | |
parent | 00c59348b92a7448954687f285bf9ea41bf16f12 (diff) | |
download | gcc-3c0c8f9dff5c2fd1e71fcbc5c05a65a33caa0303.zip gcc-3c0c8f9dff5c2fd1e71fcbc5c05a65a33caa0303.tar.gz gcc-3c0c8f9dff5c2fd1e71fcbc5c05a65a33caa0303.tar.bz2 |
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
Diffstat (limited to 'gcc/tree-chrec.c')
-rw-r--r-- | gcc/tree-chrec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/tree-chrec.c b/gcc/tree-chrec.c index 87cc148..8dae916 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". */ |