2 /* { dg-options "-O2 -ffast-math" } */
3 /* { dg-add-options c99_runtime } */
5 #include "builtins-config.h"
7 void link_error (void);
9 extern long lround(double);
10 extern long lrint(double);
12 extern long long llround(double);
13 extern long long llrint(double);
15 extern long lroundf(float);
16 extern long lrintf(float);
18 extern long long llroundf(float);
19 extern long long llrintf(float);
21 extern long lroundl(long double);
22 extern long lrintl(long double);
24 extern long long llroundl(long double);
25 extern long long llrintl(long double);
30 #ifdef HAVE_C99_RUNTIME
31 if (sizeof(long) != sizeof(long long))
34 if (__builtin_lceil(x
) != __builtin_llceil(x
))
36 if (__builtin_lfloor(x
) != __builtin_llfloor(x
))
38 if (lround(x
) != llround(x
))
40 if (lrint(x
) != llrint(x
))
47 #ifdef HAVE_C99_RUNTIME
48 if (sizeof(long) != sizeof(long long))
51 if (__builtin_lceilf(x
) != __builtin_llceilf(x
))
53 if (__builtin_lfloorf(x
) != __builtin_llfloorf(x
))
55 if (lroundf(x
) != llroundf(x
))
57 if (lrintf(x
) != llrintf(x
))
62 void testl(long double x
)
64 #ifdef HAVE_C99_RUNTIME
65 if (sizeof(long) != sizeof(long long))
68 if (__builtin_lceill(x
) != __builtin_llceill(x
))
70 if (__builtin_lfloorl(x
) != __builtin_llfloorl(x
))
72 if (lroundl(x
) != llroundl(x
))
74 if (lrintl(x
) != llrintl(x
))