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