OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [builtins-67.c] - Blame information for rev 689

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.