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/convert.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/convert.c')
-rw-r--r-- | gcc/convert.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/convert.c b/gcc/convert.c index 9ae300d21f2..4e0fc84050b 100644 --- a/gcc/convert.c +++ b/gcc/convert.c @@ -381,6 +381,13 @@ convert_to_integer (tree type, tree expr) else fn = mathfn_built_in (s_intype, BUILT_IN_LRINT); break; + + case BUILT_IN_TRUNC: case BUILT_IN_TRUNCF: case BUILT_IN_TRUNCL: + { + tree arglist = TREE_OPERAND (s_expr, 1); + return convert_to_integer (type, TREE_VALUE (arglist)); + } + default: break; } |