1 /* Check that conversion functions link correctly with -ffast-math. */
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 } */
9 #include "builtins-config.h"
11 double floor (double);
13 long double floorl (long double);
17 long double ceill (long double);
19 double round (double);
21 long double roundl (long double);
25 long double rintl (long double);
27 int ifloor (double a
) { return (int) floor (a
); }
28 #ifdef HAVE_C99_RUNTIME
29 int ifloorf (float a
) { return (int) floorf (a
); }
30 int ifloorl (long double a
) { return (int) floorl (a
); }
33 long lfloor (double a
) { return (long) floor (a
); }
34 #ifdef HAVE_C99_RUNTIME
35 long lfloorf (float a
) { return (long) floorf (a
); }
36 long lfloorl (long double a
) { return (long) floorl (a
); }
39 long long llfloor (double a
) { return (long long) floor (a
); }
40 #ifdef HAVE_C99_RUNTIME
41 long long llfloorf (float a
) { return (long long) floorf (a
); }
42 long long llfloorl (long double a
) { return (long long) floorl (a
); }
45 int iceil (double a
) { return (int) ceil (a
); }
46 #ifdef HAVE_C99_RUNTIME
47 int iceilf (float a
) { return (int) ceilf (a
); }
48 int iceill (long double a
) { return (int) ceill (a
); }
51 long lceil (double a
) { return (long) ceil (a
); }
52 #ifdef HAVE_C99_RUNTIME
53 long lceilf (float a
) { return (long) ceilf (a
); }
54 long lceill (long double a
) { return (long) ceill (a
); }
57 long long llceil (double a
) { return (long long) ceil (a
); }
58 #ifdef HAVE_C99_RUNTIME
59 long long llceilf (float a
) { return (long long) ceilf (a
); }
60 long long llceill (long double a
) { return (long long) ceill (a
); }
63 #ifdef HAVE_C99_RUNTIME
64 int iround (double a
) { return (int) round (a
); }
65 int iroundf (float a
) { return (int) roundf (a
); }
66 int iroundl (long double a
) { return (int) roundl (a
); }
69 #ifdef HAVE_C99_RUNTIME
70 int irint (double a
) { return (int) rint (a
); }
71 int irintf (float a
) { return (int) rintf (a
); }
72 int irintl (long double a
) { return (int) rintl (a
); }
75 int main () { return 0; }