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