diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1996-04-14 12:55:37 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1996-04-14 12:55:37 +0000 |
commit | 81b60185ad43d740afde3894187a314e6976c0a8 (patch) | |
tree | 4b8ac8c9031b42024246c7c5a95e54f7741e00db /gcc/fold-const.c | |
parent | b1f4df39d11ea3ec6e22a2352e3a78f953586f98 (diff) | |
download | gcc-81b60185ad43d740afde3894187a314e6976c0a8.tar.gz |
(fold_convert): Add new arg to REAL_VALUE_FROM_INT.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@11766 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 2f08eadd82b..d494f64e0c5 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. */ |