1 |
298 |
jeremybenn |
/* { dg-do compile } */
|
2 |
|
|
/* { dg-options "-std=gnu99" } */
|
3 |
|
|
|
4 |
|
|
/* N1169 7.18a.3 - Precision macros.
|
5 |
|
|
|
6 |
|
|
Check if defined fixed-point constants are ok. */
|
7 |
|
|
|
8 |
|
|
#include <stdfix.h>
|
9 |
|
|
|
10 |
|
|
short fract sf = SFRACT_MAX;
|
11 |
|
|
fract f = FRACT_MAX;
|
12 |
|
|
long fract lf = LFRACT_MAX;
|
13 |
|
|
long long fract llf = LLFRACT_MAX;
|
14 |
|
|
|
15 |
|
|
unsigned short fract usf = USFRACT_MAX;
|
16 |
|
|
unsigned fract uf = UFRACT_MAX;
|
17 |
|
|
unsigned long fract ulf = ULFRACT_MAX;
|
18 |
|
|
unsigned long long fract ullf = ULLFRACT_MAX;
|
19 |
|
|
|
20 |
|
|
sat short fract Ssf = SFRACT_MAX;
|
21 |
|
|
sat fract Sf = FRACT_MAX;
|
22 |
|
|
sat long fract Slf = LFRACT_MAX;
|
23 |
|
|
sat long long fract Sllf = LLFRACT_MAX;
|
24 |
|
|
|
25 |
|
|
sat unsigned short fract Susf = USFRACT_MAX;
|
26 |
|
|
sat unsigned fract Suf = UFRACT_MAX;
|
27 |
|
|
sat unsigned long fract Sulf = ULFRACT_MAX;
|
28 |
|
|
sat unsigned long long fract Sullf = ULLFRACT_MAX;
|
29 |
|
|
|
30 |
|
|
short fract sfm = SFRACT_MIN;
|
31 |
|
|
fract fm = FRACT_MIN;
|
32 |
|
|
long fract lfm = LFRACT_MIN;
|
33 |
|
|
long long fract llfm = LLFRACT_MIN;
|
34 |
|
|
|
35 |
|
|
unsigned short fract usfm = USFRACT_MIN;
|
36 |
|
|
unsigned fract ufm = UFRACT_MIN;
|
37 |
|
|
unsigned long fract ulfm = ULFRACT_MIN;
|
38 |
|
|
unsigned long long fract ullfm = ULLFRACT_MIN;
|
39 |
|
|
|
40 |
|
|
sat short fract Ssfm = SFRACT_MIN;
|
41 |
|
|
sat fract Sfm = FRACT_MIN;
|
42 |
|
|
sat long fract Slfm = LFRACT_MIN;
|
43 |
|
|
sat long long fract Sllfm = LLFRACT_MIN;
|
44 |
|
|
|
45 |
|
|
sat unsigned short fract Susfm = USFRACT_MIN;
|
46 |
|
|
sat unsigned fract Sufm = UFRACT_MIN;
|
47 |
|
|
sat unsigned long fract Sulfm = ULFRACT_MIN;
|
48 |
|
|
sat unsigned long long fract Sullfm = ULLFRACT_MIN;
|
49 |
|
|
|
50 |
|
|
short fract sfE = SFRACT_EPSILON;
|
51 |
|
|
fract fE = FRACT_EPSILON;
|
52 |
|
|
long fract lfE = LFRACT_EPSILON;
|
53 |
|
|
long long fract llfE = LLFRACT_EPSILON;
|
54 |
|
|
|
55 |
|
|
unsigned short fract usfE = USFRACT_EPSILON;
|
56 |
|
|
unsigned fract ufE = UFRACT_EPSILON;
|
57 |
|
|
unsigned long fract ulfE = ULFRACT_EPSILON;
|
58 |
|
|
unsigned long long fract ullfE = ULLFRACT_EPSILON;
|
59 |
|
|
|
60 |
|
|
sat short fract SsfE = SFRACT_EPSILON;
|
61 |
|
|
sat fract SfE = FRACT_EPSILON;
|
62 |
|
|
sat long fract SlfE = LFRACT_EPSILON;
|
63 |
|
|
sat long long fract SllfE = LLFRACT_EPSILON;
|
64 |
|
|
|
65 |
|
|
sat unsigned short fract SusfE = USFRACT_EPSILON;
|
66 |
|
|
sat unsigned fract SufE = UFRACT_EPSILON;
|
67 |
|
|
sat unsigned long fract SulfE = ULFRACT_EPSILON;
|
68 |
|
|
sat unsigned long long fract SullfE = ULLFRACT_EPSILON;
|
69 |
|
|
|
70 |
|
|
short accum sk = SACCUM_MAX;
|
71 |
|
|
accum k = ACCUM_MAX;
|
72 |
|
|
long accum lk = LACCUM_MAX;
|
73 |
|
|
long long accum llk = LLACCUM_MAX;
|
74 |
|
|
|
75 |
|
|
unsigned short accum usk = USACCUM_MAX;
|
76 |
|
|
unsigned accum uk = UACCUM_MAX;
|
77 |
|
|
unsigned long accum ulk = ULACCUM_MAX;
|
78 |
|
|
unsigned long long accum ullk = ULLACCUM_MAX;
|
79 |
|
|
|
80 |
|
|
sat short accum Ssk = SACCUM_MAX;
|
81 |
|
|
sat accum Sk = ACCUM_MAX;
|
82 |
|
|
sat long accum Slk = LACCUM_MAX;
|
83 |
|
|
sat long long accum Sllk = LLACCUM_MAX;
|
84 |
|
|
|
85 |
|
|
sat unsigned short accum Susk = USACCUM_MAX;
|
86 |
|
|
sat unsigned accum Suk = UACCUM_MAX;
|
87 |
|
|
sat unsigned long accum Sulk = ULACCUM_MAX;
|
88 |
|
|
sat unsigned long long accum Sullk = ULLACCUM_MAX;
|
89 |
|
|
|
90 |
|
|
short accum skm = SACCUM_MIN;
|
91 |
|
|
accum km = ACCUM_MIN;
|
92 |
|
|
long accum lkm = LACCUM_MIN;
|
93 |
|
|
long long accum llkm = LLACCUM_MIN;
|
94 |
|
|
|
95 |
|
|
unsigned short accum uskm = USACCUM_MIN;
|
96 |
|
|
unsigned accum ukm = UACCUM_MIN;
|
97 |
|
|
unsigned long accum ulkm = ULACCUM_MIN;
|
98 |
|
|
unsigned long long accum ullkm = ULLACCUM_MIN;
|
99 |
|
|
|
100 |
|
|
sat short accum Sskm = SACCUM_MIN;
|
101 |
|
|
sat accum Skm = ACCUM_MIN;
|
102 |
|
|
sat long accum Slkm = LACCUM_MIN;
|
103 |
|
|
sat long long accum Sllkm = LLACCUM_MIN;
|
104 |
|
|
|
105 |
|
|
sat unsigned short accum Suskm = USACCUM_MIN;
|
106 |
|
|
sat unsigned accum Sukm = UACCUM_MIN;
|
107 |
|
|
sat unsigned long accum Sulkm = ULACCUM_MIN;
|
108 |
|
|
sat unsigned long long accum Sullkm = ULLACCUM_MIN;
|
109 |
|
|
|
110 |
|
|
short accum skE = SACCUM_EPSILON;
|
111 |
|
|
accum kE = ACCUM_EPSILON;
|
112 |
|
|
long accum lkE = LACCUM_EPSILON;
|
113 |
|
|
long long accum llkE = LLACCUM_EPSILON;
|
114 |
|
|
|
115 |
|
|
unsigned short accum uskE = USACCUM_EPSILON;
|
116 |
|
|
unsigned accum ukE = UACCUM_EPSILON;
|
117 |
|
|
unsigned long accum ulkE = ULACCUM_EPSILON;
|
118 |
|
|
unsigned long long accum ullkE = ULLACCUM_EPSILON;
|
119 |
|
|
|
120 |
|
|
sat short accum SskE = SACCUM_EPSILON;
|
121 |
|
|
sat accum SkE = ACCUM_EPSILON;
|
122 |
|
|
sat long accum SlkE = LACCUM_EPSILON;
|
123 |
|
|
sat long long accum SllkE = LLACCUM_EPSILON;
|
124 |
|
|
|
125 |
|
|
sat unsigned short accum SuskE = USACCUM_EPSILON;
|
126 |
|
|
sat unsigned accum SukE = UACCUM_EPSILON;
|
127 |
|
|
sat unsigned long accum SulkE = ULACCUM_EPSILON;
|
128 |
|
|
sat unsigned long long accum SullkE = ULLACCUM_EPSILON;
|
129 |
|
|
|
130 |
|
|
int fbit_sf = SFRACT_FBIT;
|
131 |
|
|
int fbit_f = FRACT_FBIT;
|
132 |
|
|
int fbit_lf = LFRACT_FBIT;
|
133 |
|
|
int fbit_llf = LLFRACT_FBIT;
|
134 |
|
|
|
135 |
|
|
int fbit_usf = USFRACT_FBIT;
|
136 |
|
|
int fbit_uf = UFRACT_FBIT;
|
137 |
|
|
int fbit_ulf = ULFRACT_FBIT;
|
138 |
|
|
int fbit_ullf = ULLFRACT_FBIT;
|
139 |
|
|
|
140 |
|
|
int fbit_sk = SACCUM_FBIT;
|
141 |
|
|
int fbit_k = ACCUM_FBIT;
|
142 |
|
|
int fbit_lk = LACCUM_FBIT;
|
143 |
|
|
int fbit_llk = LLACCUM_FBIT;
|
144 |
|
|
|
145 |
|
|
int fbit_usk = USACCUM_FBIT;
|
146 |
|
|
int fbit_uk = UACCUM_FBIT;
|
147 |
|
|
int fbit_ulk = ULACCUM_FBIT;
|
148 |
|
|
int fbit_ullk = ULLACCUM_FBIT;
|
149 |
|
|
|
150 |
|
|
int ibit_sk = SACCUM_IBIT;
|
151 |
|
|
int ibit_k = ACCUM_IBIT;
|
152 |
|
|
int ibit_lk = LACCUM_IBIT;
|
153 |
|
|
int ibit_llk = LLACCUM_IBIT;
|
154 |
|
|
|
155 |
|
|
int ibit_usk = USACCUM_IBIT;
|
156 |
|
|
int ibit_uk = UACCUM_IBIT;
|
157 |
|
|
int ibit_ulk = ULACCUM_IBIT;
|
158 |
|
|
int ibit_ullk = ULLACCUM_IBIT;
|