blob: c85c4ccd7e6e2c91d6abd9f62c12b565b6607f06 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#if __SIZEOF_INT__ == __SIZEOF_FLOAT__
typedef signed int si;
typedef unsigned int ui;
#else
#error "no float-sized integer type"
#endif
#if __SIZEOF_LONG_LONG__ == __SIZEOF_DOUBLE__
typedef signed long long sl;
typedef unsigned long long ul;
#else
#error "no double-sized integer type"
#endif
si f2si(float a) { return a; }
ui f2ui(float a) { return a; }
sl f2sl(float a) { return a; }
ul f2ul(float a) { return a; }
si d2si(double a) { return a; }
ui d2ui(double a) { return a; }
sl d2sl(double a) { return a; }
ul d2ul(double a) { return a; }
/*
* check-name: fp2i cast
* check-command: test-linearize -Wno-decl $file
*
* check-output-ignore
* check-output-pattern(4): fcvts\\.
* check-output-pattern(4): fcvtu\\.
*/
|