aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1996-04-14 08:55:37 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1996-04-14 08:55:37 -0400
commit7cb6a121f2ca1f53837c8601dea6bde95014d735 (patch)
tree4b8ac8c9031b42024246c7c5a95e54f7741e00db /gcc/fold-const.c
parent2ebcccf3a3bc7f847d65b301c54a6707a628e2fd (diff)
downloadgcc-7cb6a121f2ca1f53837c8601dea6bde95014d735.zip
gcc-7cb6a121f2ca1f53837c8601dea6bde95014d735.tar.gz
gcc-7cb6a121f2ca1f53837c8601dea6bde95014d735.tar.bz2
(fold_convert): Add new arg to REAL_VALUE_FROM_INT.
From-SVN: r11766
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 2f08ead..d494f64 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -1412,10 +1412,11 @@ fold_convert (t, arg1)
REAL_VALUE_TYPE x;
REAL_VALUE_TYPE l;
REAL_VALUE_TYPE u;
+ tree type1 = TREE_TYPE (arg1);
x = TREE_REAL_CST (arg1);
- l = real_value_from_int_cst (TYPE_MIN_VALUE (type));
- u = real_value_from_int_cst (TYPE_MAX_VALUE (type));
+ l = real_value_from_int_cst (type1, TYPE_MIN_VALUE (type));
+ u = real_value_from_int_cst (type1, TYPE_MAX_VALUE (type));
/* See if X will be in range after truncation towards 0.
To compensate for truncation, move the bounds away from 0,
but reject if X exactly equals the adjusted bounds. */