diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2007-03-05 23:30:04 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2007-03-05 23:30:04 +0000 |
commit | 65bda21f7fd8143d8e7211b3ee91c61596b3d21d (patch) | |
tree | 7565b48cdb356b8efb4e7cca01d3b79f02077194 /gcc/convert.c | |
parent | 6f36e61ddaaf11b532e81bfb711f4b51214d8bfd (diff) | |
download | gcc-65bda21f7fd8143d8e7211b3ee91c61596b3d21d.zip gcc-65bda21f7fd8143d8e7211b3ee91c61596b3d21d.tar.gz gcc-65bda21f7fd8143d8e7211b3ee91c61596b3d21d.tar.bz2 |
convert.c (convert_to_integer): Fix nearbyint/rint -> *lrint conversion.
* convert.c (convert_to_integer): Fix nearbyint/rint -> *lrint
conversion.
testsuite:
* gcc.dg/torture/builtin-convert-4.c: New test.
From-SVN: r122581
Diffstat (limited to 'gcc/convert.c')
-rw-r--r-- | gcc/convert.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/convert.c b/gcc/convert.c index b6c6d0f..82b40ba 100644 --- a/gcc/convert.c +++ b/gcc/convert.c @@ -413,12 +413,12 @@ convert_to_integer (tree type, tree expr) fn = mathfn_built_in (s_intype, BUILT_IN_LLROUND); break; - CASE_FLT_FN (BUILT_IN_RINT): - /* Only convert rint* if we can ignore math exceptions. */ + CASE_FLT_FN (BUILT_IN_NEARBYINT): + /* Only convert nearbyint* if we can ignore math exceptions. */ if (flag_trapping_math) break; /* ... Fall through ... */ - CASE_FLT_FN (BUILT_IN_NEARBYINT): + CASE_FLT_FN (BUILT_IN_RINT): if (outprec < TYPE_PRECISION (long_integer_type_node) || (outprec == TYPE_PRECISION (long_integer_type_node) && !TYPE_UNSIGNED (type))) |