* builtins.def (BUILT_IN_LFLOOR, BUILT_IN_LFLOORF, BUILT_IN_LFLOORL)
[gcc.git] / gcc / testsuite / gcc.dg / builtins-53.c
1 /* Copyright (C) 2005 Free Software Foundation.
2
3 Check that (long)floor, (long)floorf, (long)floorl,
4 (long long)floor, (long long)floorf and (long long)floorl
5 built-in functions compile.
6
7 Written by Uros Bizjak, 5th April 2005. */
8
9 /* { dg-do compile } */
10 /* { dg-options "-O2 -ffast-math" } */
11
12 extern double floor(double);
13 extern float floorf(float);
14 extern long double floorl(long double);
15
16
17 long int test1(double x)
18 {
19 return floor(x);
20 }
21
22 long long int test2(double x)
23 {
24 return floor(x);
25 }
26
27 long int test1f(float x)
28 {
29 return floorf(x);
30 }
31
32 long long int test2f(float x)
33 {
34 return floorf(x);
35 }
36
37 long int test1l(long double x)
38 {
39 return floorl(x);
40 }
41
42 long long int test2l(long double x)
43 {
44 return floorl(x);
45 }