1 /* Check that conversion functions link correctly with -ffast-math.  */
2 
3 /* { dg-do link } */
4 /* { dg-options "-ffast-math -lm" }  */
5 /* Bionic doesn't have rintl */
6 /* { dg-require-effective-target non_bionic } */
7 
8 #include "builtins-config.h"
9 
10 double floor (double);
11 float floorf (float);
12 long double floorl (long double);
13 
14 double ceil (double);
15 float ceilf (float);
16 long double ceill (long double);
17 
18 double round (double);
19 float roundf (float);
20 long double roundl (long double);
21 
22 double rint (double);
23 float rintf (float);
24 long double rintl (long double);
25 
ifloor(double a)26 int ifloor (double a) { return (int) floor (a); }
27 #ifdef HAVE_C99_RUNTIME
ifloorf(float a)28 int ifloorf (float a) { return (int) floorf (a); }
ifloorl(long double a)29 int ifloorl (long double a) { return (int) floorl (a); }
30 #endif
31 
lfloor(double a)32 long lfloor (double a) { return (long) floor (a); }
33 #ifdef HAVE_C99_RUNTIME
lfloorf(float a)34 long lfloorf (float a) { return (long) floorf (a); }
lfloorl(long double a)35 long lfloorl (long double a) { return (long) floorl (a); }
36 #endif
37 
llfloor(double a)38 long long llfloor (double a) { return (long long) floor (a); }
39 #ifdef HAVE_C99_RUNTIME
llfloorf(float a)40 long long llfloorf (float a) { return (long long) floorf (a); }
llfloorl(long double a)41 long long llfloorl (long double a) { return (long long) floorl (a); }
42 #endif
43 
iceil(double a)44 int iceil (double a) { return (int) ceil (a); }
45 #ifdef HAVE_C99_RUNTIME
iceilf(float a)46 int iceilf (float a) { return (int) ceilf (a); }
iceill(long double a)47 int iceill (long double a) { return (int) ceill (a); }
48 #endif
49 
lceil(double a)50 long lceil (double a) { return (long) ceil (a); }
51 #ifdef HAVE_C99_RUNTIME
lceilf(float a)52 long lceilf (float a) { return (long) ceilf (a); }
lceill(long double a)53 long lceill (long double a) { return (long) ceill (a); }
54 #endif
55 
llceil(double a)56 long long llceil (double a) { return (long long) ceil (a); }
57 #ifdef HAVE_C99_RUNTIME
llceilf(float a)58 long long llceilf (float a) { return (long long) ceilf (a); }
llceill(long double a)59 long long llceill (long double a) { return (long long) ceill (a); }
60 #endif
61 
62 #ifdef HAVE_C99_RUNTIME
iround(double a)63 int iround (double a) { return (int) round (a); }
iroundf(float a)64 int iroundf (float a) { return (int) roundf (a); }
iroundl(long double a)65 int iroundl (long double a) { return (int) roundl (a); }
66 #endif
67 
68 #ifdef HAVE_C99_RUNTIME
irint(double a)69 int irint (double a) { return (int) rint (a); }
irintf(float a)70 int irintf (float a) { return (int) rintf (a); }
irintl(long double a)71 int irintl (long double a) { return (int) rintl (a); }
72 #endif
73 
main()74 int main () { return 0; }
75