2 /* { dg-options "-O2 -ffast-math" } */
3 /* { dg-options "-ffast-math -mmacosx-version-min=10.3" { target powerpc-*-darwin* } } */
4 /* { dg-options "-O2 -ffast-math -std=c99" { target *-*-solaris2* } } */
6 #include "builtins-config.h"
8 void link_error (void);
10 extern long lround(double);
11 extern long lrint(double);
13 extern long long llround(double);
14 extern long long llrint(double);
16 extern long lroundf(float);
17 extern long lrintf(float);
19 extern long long llroundf(float);
20 extern long long llrintf(float);
22 extern long lroundl(long double);
23 extern long lrintl(long double);
25 extern long long llroundl(long double);
26 extern long long llrintl(long double);
31 #ifdef HAVE_C99_RUNTIME
32 if (sizeof(long) != sizeof(long long))
35 if (lround(x
) != llround(x
))
37 if (lrint(x
) != llrint(x
))
44 #ifdef HAVE_C99_RUNTIME
45 if (sizeof(long) != sizeof(long long))
48 if (lroundf(x
) != llroundf(x
))
50 if (lrintf(x
) != llrintf(x
))
55 void testl(long double x
)
57 #ifdef HAVE_C99_RUNTIME
58 if (sizeof(long) != sizeof(long long))
61 if (lroundl(x
) != llroundl(x
))
63 if (lrintl(x
) != llrintl(x
))