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