From 2ec76fdb2413bee3123b322e4f4259ba9f9c8310 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Thu, 14 Apr 2005 13:26:45 +0200 Subject: convert.c (convert_to_integer): Convert (long int)trunc{,f,l}, and (long long int)ceil{,f,l} into FIX_TRUNC_EXPR. * 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*. From-SVN: r98131 --- gcc/convert.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gcc/convert.c') diff --git a/gcc/convert.c b/gcc/convert.c index 9ae300d..4e0fc84 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; } -- cgit v1.1