Commit 7cb6a121 by Richard Kenner

(fold_convert): Add new arg to REAL_VALUE_FROM_INT.

From-SVN: r11766
parent 2ebcccf3
...@@ -1412,10 +1412,11 @@ fold_convert (t, arg1) ...@@ -1412,10 +1412,11 @@ fold_convert (t, arg1)
REAL_VALUE_TYPE x; REAL_VALUE_TYPE x;
REAL_VALUE_TYPE l; REAL_VALUE_TYPE l;
REAL_VALUE_TYPE u; REAL_VALUE_TYPE u;
tree type1 = TREE_TYPE (arg1);
x = TREE_REAL_CST (arg1); x = TREE_REAL_CST (arg1);
l = real_value_from_int_cst (TYPE_MIN_VALUE (type)); l = real_value_from_int_cst (type1, TYPE_MIN_VALUE (type));
u = real_value_from_int_cst (TYPE_MAX_VALUE (type)); u = real_value_from_int_cst (type1, TYPE_MAX_VALUE (type));
/* See if X will be in range after truncation towards 0. /* See if X will be in range after truncation towards 0.
To compensate for truncation, move the bounds away from 0, To compensate for truncation, move the bounds away from 0,
but reject if X exactly equals the adjusted bounds. */ but reject if X exactly equals the adjusted bounds. */
......
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