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 
7 #include "builtins-config.h"
8 
9 double floor (double);
10 float floorf (float);
11 long double floorl (long double);
12 
13 double ceil (double);
14 float ceilf (float);
15 long double ceill (long double);
16 
17 double round (double);
18 float roundf (float);
19 long double roundl (long double);
20 
21 double rint (double);
22 float rintf (float);
23 long double rintl (long double);
24 
ifloor(double a)25 int ifloor (double a) { return (int) floor (a); }
26 #ifdef HAVE_C99_RUNTIME
ifloorf(float a)27 int ifloorf (float a) { return (int) floorf (a); }
ifloorl(long double a)28 int ifloorl (long double a) { return (int) floorl (a); }
29 #endif
30 
lfloor(double a)31 long lfloor (double a) { return (long) floor (a); }
32 #ifdef HAVE_C99_RUNTIME
lfloorf(float a)33 long lfloorf (float a) { return (long) floorf (a); }
lfloorl(long double a)34 long lfloorl (long double a) { return (long) floorl (a); }
35 #endif
36 
llfloor(double a)37 long long llfloor (double a) { return (long long) floor (a); }
38 #ifdef HAVE_C99_RUNTIME
llfloorf(float a)39 long long llfloorf (float a) { return (long long) floorf (a); }
llfloorl(long double a)40 long long llfloorl (long double a) { return (long long) floorl (a); }
41 #endif
42 
iceil(double a)43 int iceil (double a) { return (int) ceil (a); }
44 #ifdef HAVE_C99_RUNTIME
iceilf(float a)45 int iceilf (float a) { return (int) ceilf (a); }
iceill(long double a)46 int iceill (long double a) { return (int) ceill (a); }
47 #endif
48 
lceil(double a)49 long lceil (double a) { return (long) ceil (a); }
50 #ifdef HAVE_C99_RUNTIME
lceilf(float a)51 long lceilf (float a) { return (long) ceilf (a); }
lceill(long double a)52 long lceill (long double a) { return (long) ceill (a); }
53 #endif
54 
llceil(double a)55 long long llceil (double a) { return (long long) ceil (a); }
56 #ifdef HAVE_C99_RUNTIME
llceilf(float a)57 long long llceilf (float a) { return (long long) ceilf (a); }
llceill(long double a)58 long long llceill (long double a) { return (long long) ceill (a); }
59 #endif
60 
61 #ifdef HAVE_C99_RUNTIME
iround(double a)62 int iround (double a) { return (int) round (a); }
iroundf(float a)63 int iroundf (float a) { return (int) roundf (a); }
iroundl(long double a)64 int iroundl (long double a) { return (int) roundl (a); }
65 #endif
66 
67 #ifdef HAVE_C99_RUNTIME
irint(double a)68 int irint (double a) { return (int) rint (a); }
irintf(float a)69 int irintf (float a) { return (int) rintf (a); }
irintl(long double a)70 int irintl (long double a) { return (int) rintl (a); }
71 #endif
72 
main()73 int main () { return 0; }
74