diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-05 23:30:04 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-05 23:30:04 +0000 |
commit | 7e50d9b5379a2ba16a5772976876807f6d5a282f (patch) | |
tree | 7565b48cdb356b8efb4e7cca01d3b79f02077194 /gcc/convert.c | |
parent | 236d4a66c20c4f418596cb4ae7acfafb37a46ffe (diff) | |
download | gcc-7e50d9b5379a2ba16a5772976876807f6d5a282f.tar.gz |
* convert.c (convert_to_integer): Fix nearbyint/rint -> *lrint
conversion.
testsuite:
* gcc.dg/torture/builtin-convert-4.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122581 138bc75d-0d04-0410-961f-82ee72b054a4
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 b6c6d0fcf75..82b40bad0a7 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))) |