builtin-has-attribute-4.c: Skip on 32-bit hppa*-*-hpux*.
[official-gcc.git] / gcc / testsuite / gcc.dg / builtins-67.c
blob0992fe1597f6e49b10961077fa4ca39235b6cd27
1 /* Check that conversion functions link correctly with -ffast-math. */
3 /* { dg-do link } */
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);
12 float floorf (float);
13 long double floorl (long double);
15 double ceil (double);
16 float ceilf (float);
17 long double ceill (long double);
19 double round (double);
20 float roundf (float);
21 long double roundl (long double);
23 double rint (double);
24 float rintf (float);
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); }
31 #endif
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); }
37 #endif
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); }
43 #endif
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); }
49 #endif
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); }
55 #endif
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); }
61 #endif
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); }
67 #endif
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); }
73 #endif
75 int main () { return 0; }