diff options
author | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-14 11:26:45 +0000 |
---|---|---|
committer | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-14 11:26:45 +0000 |
commit | 13d9b8f8a19df18f2842100a21ce74610675e1d7 (patch) | |
tree | e66d3ba10f9caef0d152e7a4934acc4e6d2153d0 /gcc/testsuite/gcc.dg/builtins-53.c | |
parent | af3f09df1130f1b32db1658c66d3db31edc5c2aa (diff) | |
download | gcc-13d9b8f8a19df18f2842100a21ce74610675e1d7.tar.gz |
* convert.c (convert_to_integer): Convert (long int)trunc{,f,l},
and (long long int)ceil{,f,l} into FIX_TRUNC_EXPR.
testsuite:
* gcc.dg/builtins-53.c: Also check (int)trunc* and
(long long int)trunc*.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98131 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/builtins-53.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/builtins-53.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/builtins-53.c b/gcc/testsuite/gcc.dg/builtins-53.c index 6bf481b1c37..0a080704fb3 100644 --- a/gcc/testsuite/gcc.dg/builtins-53.c +++ b/gcc/testsuite/gcc.dg/builtins-53.c @@ -13,12 +13,15 @@ extern double floor(double); extern double ceil(double); +extern double trunc(double); extern float floorf(float); extern float ceilf(float); +extern float truncf(float); extern long double floorl(long double); extern long double ceill(long double); +extern long double truncl(long double); long int test1(double x) @@ -41,6 +44,16 @@ long long int test4(double x) return ceil(x); } +long int test5(double x) +{ + return trunc(x); +} + +long long int test6(double x) +{ + return trunc(x); +} + long int test1f(float x) { return floorf(x); @@ -61,6 +74,16 @@ long long int test4f(float x) return ceilf(x); } +long int test5f(float x) +{ + return truncf(x); +} + +long long int test6f(float x) +{ + return truncf(x); +} + long int test1l(long double x) { return floorl(x); @@ -80,3 +103,13 @@ long long int test4l(long double x) { return ceill(x); } + +long int test5l(long double x) +{ + return truncl(x); +} + +long long int test6l(long double x) +{ + return truncl(x); +} |