blob: f8bb921a68cb7606fb3e2ddf8496ab4aefaa1f78 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -E -ffreestanding -triple=arm-none-none %s | FileCheck -check-prefix ARM %s
Chris Lattnerbceaf862009-10-29 04:55:36 +00002//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +00003// ARM:typedef signed long long int int64_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +00004// ARM:typedef unsigned long long int uint64_t;
5// ARM:typedef int64_t int_least64_t;
6// ARM:typedef uint64_t uint_least64_t;
7// ARM:typedef int64_t int_fast64_t;
8// ARM:typedef uint64_t uint_fast64_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +00009//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +000010// ARM:typedef signed int int32_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +000011// ARM:typedef unsigned int uint32_t;
12// ARM:typedef int32_t int_least32_t;
13// ARM:typedef uint32_t uint_least32_t;
14// ARM:typedef int32_t int_fast32_t;
15// ARM:typedef uint32_t uint_fast32_t;
16//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +000017// ARM:typedef signed short int16_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +000018// ARM:typedef unsigned short uint16_t;
19// ARM:typedef int16_t int_least16_t;
20// ARM:typedef uint16_t uint_least16_t;
21// ARM:typedef int16_t int_fast16_t;
22// ARM:typedef uint16_t uint_fast16_t;
23//
Chris Lattner06dcf6b2009-11-04 23:03:18 +000024// ARM:typedef signed char int8_t;
25// ARM:typedef unsigned char uint8_t;
26// ARM:typedef int8_t int_least8_t;
27// ARM:typedef uint8_t uint_least8_t;
28// ARM:typedef int8_t int_fast8_t;
29// ARM:typedef uint8_t uint_fast8_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +000030//
Ken Dyck08321b42009-11-18 20:24:13 +000031// ARM:typedef int32_t intptr_t;
32// ARM:typedef uint32_t uintptr_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +000033//
Daniel Dunbar96d38c12010-06-30 06:30:50 +000034// ARM:typedef long long int intmax_t;
35// ARM:typedef long long unsigned int uintmax_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +000036//
37// ARM:INT8_MAX_ 127
Ken Dyckb0887562009-11-17 18:29:12 +000038// ARM:INT8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +000039// ARM:UINT8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +000040// ARM:INT_LEAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +000041// ARM:INT_LEAST8_MAX_ 127
42// ARM:UINT_LEAST8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +000043// ARM:INT_FAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +000044// ARM:INT_FAST8_MAX_ 127
45// ARM:UINT_FAST8_MAX_ 255
46//
47// ARM:INT16_MAX_ 32767
Ken Dyckb0887562009-11-17 18:29:12 +000048// ARM:INT16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +000049// ARM:UINT16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +000050// ARM:INT_LEAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +000051// ARM:INT_LEAST16_MAX_ 32767
52// ARM:UINT_LEAST16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +000053// ARM:INT_FAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +000054// ARM:INT_FAST16_MAX_ 32767
55// ARM:UINT_FAST16_MAX_ 65535
56//
57// ARM:INT32_MAX_ 2147483647
58// ARM:INT32_MIN_ (-2147483647 -1)
59// ARM:UINT32_MAX_ 4294967295U
60// ARM:INT_LEAST32_MIN_ (-2147483647 -1)
61// ARM:INT_LEAST32_MAX_ 2147483647
62// ARM:UINT_LEAST32_MAX_ 4294967295U
63// ARM:INT_FAST32_MIN_ (-2147483647 -1)
64// ARM:INT_FAST32_MAX_ 2147483647
65// ARM:UINT_FAST32_MAX_ 4294967295U
66//
67// ARM:INT64_MAX_ 9223372036854775807LL
68// ARM:INT64_MIN_ (-9223372036854775807LL -1)
69// ARM:UINT64_MAX_ 18446744073709551615ULL
70// ARM:INT_LEAST64_MIN_ (-9223372036854775807LL -1)
71// ARM:INT_LEAST64_MAX_ 9223372036854775807LL
72// ARM:UINT_LEAST64_MAX_ 18446744073709551615ULL
73// ARM:INT_FAST64_MIN_ (-9223372036854775807LL -1)
74// ARM:INT_FAST64_MAX_ 9223372036854775807LL
75// ARM:UINT_FAST64_MAX_ 18446744073709551615ULL
76//
77// ARM:INTPTR_MIN_ (-2147483647 -1)
78// ARM:INTPTR_MAX_ 2147483647
79// ARM:UINTPTR_MAX_ 4294967295U
80// ARM:PTRDIFF_MIN_ (-2147483647 -1)
81// ARM:PTRDIFF_MAX_ 2147483647
82// ARM:SIZE_MAX_ 4294967295U
83//
84// ARM:INTMAX_MIN_ (-9223372036854775807LL -1)
85// ARM:INTMAX_MAX_ 9223372036854775807LL
Ken Dyckdb57ce52009-11-18 19:22:15 +000086// ARM:UINTMAX_MAX_ 18446744073709551615ULL
Chris Lattnerbceaf862009-10-29 04:55:36 +000087//
88// ARM:SIG_ATOMIC_MIN_ (-2147483647 -1)
89// ARM:SIG_ATOMIC_MAX_ 2147483647
90// ARM:WINT_MIN_ (-2147483647 -1)
91// ARM:WINT_MAX_ 2147483647
92//
93// ARM:WCHAR_MAX_ 2147483647
94// ARM:WCHAR_MIN_ (-2147483647 -1)
95//
Ken Dyck6ab25f42009-11-17 13:54:02 +000096// ARM:INT8_C_(0) 0
97// ARM:UINT8_C_(0) 0U
98// ARM:INT16_C_(0) 0
99// ARM:UINT16_C_(0) 0U
100// ARM:INT32_C_(0) 0
101// ARM:UINT32_C_(0) 0U
102// ARM:INT64_C_(0) 0LL
103// ARM:UINT64_C_(0) 0ULL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000104//
Ken Dyck6ab25f42009-11-17 13:54:02 +0000105// ARM:INTMAX_C_(0) 0LL
106// ARM:UINTMAX_C_(0) 0ULL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000107//
108//
Daniel Dunbara5728872009-12-15 20:14:24 +0000109// RUN: %clang_cc1 -E -ffreestanding -triple=bfin-none-none %s | FileCheck -check-prefix BFIN %s
Chris Lattnerbceaf862009-10-29 04:55:36 +0000110//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000111// BFIN:typedef signed long long int int64_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000112// BFIN:typedef unsigned long long int uint64_t;
113// BFIN:typedef int64_t int_least64_t;
114// BFIN:typedef uint64_t uint_least64_t;
115// BFIN:typedef int64_t int_fast64_t;
116// BFIN:typedef uint64_t uint_fast64_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000117//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000118// BFIN:typedef signed int int32_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000119// BFIN:typedef unsigned int uint32_t;
120// BFIN:typedef int32_t int_least32_t;
121// BFIN:typedef uint32_t uint_least32_t;
122// BFIN:typedef int32_t int_fast32_t;
123// BFIN:typedef uint32_t uint_fast32_t;
124//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000125// BFIN:typedef signed short int16_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000126// BFIN:typedef unsigned short uint16_t;
127// BFIN:typedef int16_t int_least16_t;
128// BFIN:typedef uint16_t uint_least16_t;
129// BFIN:typedef int16_t int_fast16_t;
130// BFIN:typedef uint16_t uint_fast16_t;
131//
132// BFIN:typedef signed char int8_t;
133// BFIN:typedef unsigned char uint8_t;
134// BFIN:typedef int8_t int_least8_t;
135// BFIN:typedef uint8_t uint_least8_t;
136// BFIN:typedef int8_t int_fast8_t;
137// BFIN:typedef uint8_t uint_fast8_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000138//
Ken Dyck08321b42009-11-18 20:24:13 +0000139// BFIN:typedef int32_t intptr_t;
140// BFIN:typedef uint32_t uintptr_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000141//
Daniel Dunbar96d38c12010-06-30 06:30:50 +0000142// BFIN:typedef long long int intmax_t;
143// BFIN:typedef long long unsigned int uintmax_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000144//
145// BFIN:INT8_MAX_ 127
Ken Dyckb0887562009-11-17 18:29:12 +0000146// BFIN:INT8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000147// BFIN:UINT8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000148// BFIN:INT_LEAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000149// BFIN:INT_LEAST8_MAX_ 127
150// BFIN:UINT_LEAST8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000151// BFIN:INT_FAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000152// BFIN:INT_FAST8_MAX_ 127
153// BFIN:UINT_FAST8_MAX_ 255
154//
155// BFIN:INT16_MAX_ 32767
Ken Dyckb0887562009-11-17 18:29:12 +0000156// BFIN:INT16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000157// BFIN:UINT16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000158// BFIN:INT_LEAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000159// BFIN:INT_LEAST16_MAX_ 32767
160// BFIN:UINT_LEAST16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000161// BFIN:INT_FAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000162// BFIN:INT_FAST16_MAX_ 32767
163// BFIN:UINT_FAST16_MAX_ 65535
164//
165// BFIN:INT32_MAX_ 2147483647
166// BFIN:INT32_MIN_ (-2147483647 -1)
167// BFIN:UINT32_MAX_ 4294967295U
168// BFIN:INT_LEAST32_MIN_ (-2147483647 -1)
169// BFIN:INT_LEAST32_MAX_ 2147483647
170// BFIN:UINT_LEAST32_MAX_ 4294967295U
171// BFIN:INT_FAST32_MIN_ (-2147483647 -1)
172// BFIN:INT_FAST32_MAX_ 2147483647
173// BFIN:UINT_FAST32_MAX_ 4294967295U
174//
175// BFIN:INT64_MAX_ 9223372036854775807LL
176// BFIN:INT64_MIN_ (-9223372036854775807LL -1)
177// BFIN:UINT64_MAX_ 18446744073709551615ULL
178// BFIN:INT_LEAST64_MIN_ (-9223372036854775807LL -1)
179// BFIN:INT_LEAST64_MAX_ 9223372036854775807LL
180// BFIN:UINT_LEAST64_MAX_ 18446744073709551615ULL
181// BFIN:INT_FAST64_MIN_ (-9223372036854775807LL -1)
182// BFIN:INT_FAST64_MAX_ 9223372036854775807LL
183// BFIN:UINT_FAST64_MAX_ 18446744073709551615ULL
184//
185// BFIN:INTPTR_MIN_ (-2147483647 -1)
186// BFIN:INTPTR_MAX_ 2147483647
187// BFIN:UINTPTR_MAX_ 4294967295U
188// BFIN:PTRDIFF_MIN_ (-2147483647 -1)
189// BFIN:PTRDIFF_MAX_ 2147483647
190// BFIN:SIZE_MAX_ 4294967295U
191//
192// BFIN:INTMAX_MIN_ (-9223372036854775807LL -1)
193// BFIN:INTMAX_MAX_ 9223372036854775807LL
Ken Dyckdb57ce52009-11-18 19:22:15 +0000194// BFIN:UINTMAX_MAX_ 18446744073709551615ULL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000195//
196// BFIN:SIG_ATOMIC_MIN_ (-2147483647 -1)
197// BFIN:SIG_ATOMIC_MAX_ 2147483647
198// BFIN:WINT_MIN_ (-2147483647 -1)
199// BFIN:WINT_MAX_ 2147483647
200//
201// BFIN:WCHAR_MAX_ 2147483647
202// BFIN:WCHAR_MIN_ (-2147483647 -1)
203//
Ken Dyck6ab25f42009-11-17 13:54:02 +0000204// BFIN:INT8_C_(0) 0
205// BFIN:UINT8_C_(0) 0U
206// BFIN:INT16_C_(0) 0
207// BFIN:UINT16_C_(0) 0U
208// BFIN:INT32_C_(0) 0
209// BFIN:UINT32_C_(0) 0U
210// BFIN:INT64_C_(0) 0LL
211// BFIN:UINT64_C_(0) 0ULL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000212//
Ken Dyck6ab25f42009-11-17 13:54:02 +0000213// BFIN:INTMAX_C_(0) 0LL
214// BFIN:UINTMAX_C_(0) 0ULL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000215//
216//
Daniel Dunbara5728872009-12-15 20:14:24 +0000217// RUN: %clang_cc1 -E -ffreestanding -triple=i386-none-none %s | FileCheck -check-prefix I386 %s
Chris Lattnerbceaf862009-10-29 04:55:36 +0000218//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000219// I386:typedef signed long long int int64_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000220// I386:typedef unsigned long long int uint64_t;
221// I386:typedef int64_t int_least64_t;
222// I386:typedef uint64_t uint_least64_t;
223// I386:typedef int64_t int_fast64_t;
224// I386:typedef uint64_t uint_fast64_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000225//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000226// I386:typedef signed int int32_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000227// I386:typedef unsigned int uint32_t;
228// I386:typedef int32_t int_least32_t;
229// I386:typedef uint32_t uint_least32_t;
230// I386:typedef int32_t int_fast32_t;
231// I386:typedef uint32_t uint_fast32_t;
232//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000233// I386:typedef signed short int16_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000234// I386:typedef unsigned short uint16_t;
235// I386:typedef int16_t int_least16_t;
236// I386:typedef uint16_t uint_least16_t;
237// I386:typedef int16_t int_fast16_t;
238// I386:typedef uint16_t uint_fast16_t;
239//
240// I386:typedef signed char int8_t;
241// I386:typedef unsigned char uint8_t;
242// I386:typedef int8_t int_least8_t;
243// I386:typedef uint8_t uint_least8_t;
244// I386:typedef int8_t int_fast8_t;
245// I386:typedef uint8_t uint_fast8_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000246//
Ken Dyck08321b42009-11-18 20:24:13 +0000247// I386:typedef int32_t intptr_t;
248// I386:typedef uint32_t uintptr_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000249//
Daniel Dunbar96d38c12010-06-30 06:30:50 +0000250// I386:typedef long long int intmax_t;
251// I386:typedef long long unsigned int uintmax_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000252//
253// I386:INT8_MAX_ 127
Ken Dyckb0887562009-11-17 18:29:12 +0000254// I386:INT8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000255// I386:UINT8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000256// I386:INT_LEAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000257// I386:INT_LEAST8_MAX_ 127
258// I386:UINT_LEAST8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000259// I386:INT_FAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000260// I386:INT_FAST8_MAX_ 127
261// I386:UINT_FAST8_MAX_ 255
262//
263// I386:INT16_MAX_ 32767
Ken Dyckb0887562009-11-17 18:29:12 +0000264// I386:INT16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000265// I386:UINT16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000266// I386:INT_LEAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000267// I386:INT_LEAST16_MAX_ 32767
268// I386:UINT_LEAST16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000269// I386:INT_FAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000270// I386:INT_FAST16_MAX_ 32767
271// I386:UINT_FAST16_MAX_ 65535
272//
273// I386:INT32_MAX_ 2147483647
274// I386:INT32_MIN_ (-2147483647 -1)
275// I386:UINT32_MAX_ 4294967295U
276// I386:INT_LEAST32_MIN_ (-2147483647 -1)
277// I386:INT_LEAST32_MAX_ 2147483647
278// I386:UINT_LEAST32_MAX_ 4294967295U
279// I386:INT_FAST32_MIN_ (-2147483647 -1)
280// I386:INT_FAST32_MAX_ 2147483647
281// I386:UINT_FAST32_MAX_ 4294967295U
282//
283// I386:INT64_MAX_ 9223372036854775807LL
284// I386:INT64_MIN_ (-9223372036854775807LL -1)
285// I386:UINT64_MAX_ 18446744073709551615ULL
286// I386:INT_LEAST64_MIN_ (-9223372036854775807LL -1)
287// I386:INT_LEAST64_MAX_ 9223372036854775807LL
288// I386:UINT_LEAST64_MAX_ 18446744073709551615ULL
289// I386:INT_FAST64_MIN_ (-9223372036854775807LL -1)
290// I386:INT_FAST64_MAX_ 9223372036854775807LL
291// I386:UINT_FAST64_MAX_ 18446744073709551615ULL
292//
293// I386:INTPTR_MIN_ (-2147483647 -1)
294// I386:INTPTR_MAX_ 2147483647
295// I386:UINTPTR_MAX_ 4294967295U
296// I386:PTRDIFF_MIN_ (-2147483647 -1)
297// I386:PTRDIFF_MAX_ 2147483647
298// I386:SIZE_MAX_ 4294967295U
299//
300// I386:INTMAX_MIN_ (-9223372036854775807LL -1)
301// I386:INTMAX_MAX_ 9223372036854775807LL
Ken Dyckdb57ce52009-11-18 19:22:15 +0000302// I386:UINTMAX_MAX_ 18446744073709551615ULL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000303//
304// I386:SIG_ATOMIC_MIN_ (-2147483647 -1)
305// I386:SIG_ATOMIC_MAX_ 2147483647
306// I386:WINT_MIN_ (-2147483647 -1)
307// I386:WINT_MAX_ 2147483647
308//
309// I386:WCHAR_MAX_ 2147483647
310// I386:WCHAR_MIN_ (-2147483647 -1)
311//
Ken Dyck6ab25f42009-11-17 13:54:02 +0000312// I386:INT8_C_(0) 0
313// I386:UINT8_C_(0) 0U
314// I386:INT16_C_(0) 0
315// I386:UINT16_C_(0) 0U
316// I386:INT32_C_(0) 0
317// I386:UINT32_C_(0) 0U
318// I386:INT64_C_(0) 0LL
319// I386:UINT64_C_(0) 0ULL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000320//
Ken Dyck6ab25f42009-11-17 13:54:02 +0000321// I386:INTMAX_C_(0) 0LL
322// I386:UINTMAX_C_(0) 0ULL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000323//
Daniel Dunbara5728872009-12-15 20:14:24 +0000324// RUN: %clang_cc1 -E -ffreestanding -triple=msp430-none-none %s | FileCheck -check-prefix MSP430 %s
Chris Lattnerbceaf862009-10-29 04:55:36 +0000325//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000326// MSP430:typedef signed long int int32_t;
327// MSP430:typedef unsigned long int uint32_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000328// MSP430:typedef int32_t int_least32_t;
329// MSP430:typedef uint32_t uint_least32_t;
330// MSP430:typedef int32_t int_fast32_t;
331// MSP430:typedef uint32_t uint_fast32_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000332//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000333// MSP430:typedef signed short int16_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000334// MSP430:typedef unsigned short uint16_t;
335// MSP430:typedef int16_t int_least16_t;
336// MSP430:typedef uint16_t uint_least16_t;
337// MSP430:typedef int16_t int_fast16_t;
338// MSP430:typedef uint16_t uint_fast16_t;
339//
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000340// MSP430:typedef signed char int8_t;
341// MSP430:typedef unsigned char uint8_t;
342// MSP430:typedef int8_t int_least8_t;
343// MSP430:typedef uint8_t uint_least8_t;
344// MSP430:typedef int8_t int_fast8_t;
345// MSP430:typedef uint8_t uint_fast8_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000346//
Ken Dyck08321b42009-11-18 20:24:13 +0000347// MSP430:typedef int16_t intptr_t;
348// MSP430:typedef uint16_t uintptr_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000349//
Daniel Dunbar96d38c12010-06-30 06:30:50 +0000350// MSP430:typedef long int intmax_t;
351// MSP430:typedef long unsigned int uintmax_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000352//
353// MSP430:INT8_MAX_ 127
Ken Dyckb0887562009-11-17 18:29:12 +0000354// MSP430:INT8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000355// MSP430:UINT8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000356// MSP430:INT_LEAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000357// MSP430:INT_LEAST8_MAX_ 127
358// MSP430:UINT_LEAST8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000359// MSP430:INT_FAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000360// MSP430:INT_FAST8_MAX_ 127
361// MSP430:UINT_FAST8_MAX_ 255
362//
363// MSP430:INT16_MAX_ 32767
Ken Dyckb0887562009-11-17 18:29:12 +0000364// MSP430:INT16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000365// MSP430:UINT16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000366// MSP430:INT_LEAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000367// MSP430:INT_LEAST16_MAX_ 32767
368// MSP430:UINT_LEAST16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000369// MSP430:INT_FAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000370// MSP430:INT_FAST16_MAX_ 32767
371// MSP430:UINT_FAST16_MAX_ 65535
372//
Ken Dyck81638412009-11-17 16:26:27 +0000373// MSP430:INT32_MAX_ 2147483647L
374// MSP430:INT32_MIN_ (-2147483647L -1)
375// MSP430:UINT32_MAX_ 4294967295UL
376// MSP430:INT_LEAST32_MIN_ (-2147483647L -1)
377// MSP430:INT_LEAST32_MAX_ 2147483647L
378// MSP430:UINT_LEAST32_MAX_ 4294967295UL
379// MSP430:INT_FAST32_MIN_ (-2147483647L -1)
380// MSP430:INT_FAST32_MAX_ 2147483647L
381// MSP430:UINT_FAST32_MAX_ 4294967295UL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000382//
Anton Korobeynikov79bff432010-01-14 21:36:52 +0000383// MSP430:INT64_MAX_ 9223372036854775807LL
384// MSP430:INT64_MIN_ (-9223372036854775807LL -1)
385// MSP430:UINT64_MAX_ 18446744073709551615ULL
386// MSP430:INT_LEAST64_MIN_ (-9223372036854775807LL -1)
387// MSP430:INT_LEAST64_MAX_ 9223372036854775807LL
388// MSP430:UINT_LEAST64_MAX_ 18446744073709551615ULL
389// MSP430:INT_FAST64_MIN_ (-9223372036854775807LL -1)
390// MSP430:INT_FAST64_MAX_ 9223372036854775807LL
391// MSP430:UINT_FAST64_MAX_ 18446744073709551615ULL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000392//
Ken Dyckb0887562009-11-17 18:29:12 +0000393// MSP430:INTPTR_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000394// MSP430:INTPTR_MAX_ 32767
395// MSP430:UINTPTR_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000396// MSP430:PTRDIFF_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000397// MSP430:PTRDIFF_MAX_ 32767
398// MSP430:SIZE_MAX_ 65535
399//
400// MSP430:INTMAX_MIN_ (-2147483647L -1)
401// MSP430:INTMAX_MAX_ 2147483647L
Ken Dyckdb57ce52009-11-18 19:22:15 +0000402// MSP430:UINTMAX_MAX_ 4294967295UL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000403//
Ken Dyck81638412009-11-17 16:26:27 +0000404// MSP430:SIG_ATOMIC_MIN_ (-2147483647L -1)
405// MSP430:SIG_ATOMIC_MAX_ 2147483647L
Ken Dyckbfec4b02009-11-19 14:35:19 +0000406// MSP430:WINT_MIN_ (-32767 -1)
407// MSP430:WINT_MAX_ 32767
Chris Lattnerbceaf862009-10-29 04:55:36 +0000408//
Chris Lattner91846462009-11-12 08:04:33 +0000409// MSP430:WCHAR_MAX_ 32767
410// MSP430:WCHAR_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000411//
Ken Dyck6ab25f42009-11-17 13:54:02 +0000412// MSP430:INT8_C_(0) 0
413// MSP430:UINT8_C_(0) 0U
414// MSP430:INT16_C_(0) 0
415// MSP430:UINT16_C_(0) 0U
416// MSP430:INT32_C_(0) 0L
417// MSP430:UINT32_C_(0) 0UL
Anton Korobeynikov79bff432010-01-14 21:36:52 +0000418// MSP430:INT64_C_(0) 0LL
419// MSP430:UINT64_C_(0) 0ULL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000420//
Ken Dyck832b7102009-11-18 19:42:57 +0000421// MSP430:INTMAX_C_(0) 0L
422// MSP430:UINTMAX_C_(0) 0UL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000423//
Daniel Dunbara5728872009-12-15 20:14:24 +0000424// RUN: %clang_cc1 -E -ffreestanding -triple=pic16-none-none %s | FileCheck -check-prefix PIC16 %s
Chris Lattnerbceaf862009-10-29 04:55:36 +0000425//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000426// PIC16:typedef signed long int int32_t;
427// PIC16:typedef unsigned long int uint32_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000428// PIC16:typedef int32_t int_least32_t;
429// PIC16:typedef uint32_t uint_least32_t;
430// PIC16:typedef int32_t int_fast32_t;
431// PIC16:typedef uint32_t uint_fast32_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000432//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000433// PIC16:typedef signed short int16_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000434// PIC16:typedef unsigned short uint16_t;
435// PIC16:typedef int16_t int_least16_t;
436// PIC16:typedef uint16_t uint_least16_t;
437// PIC16:typedef int16_t int_fast16_t;
438// PIC16:typedef uint16_t uint_fast16_t;
439//
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000440// PIC16:typedef signed char int8_t;
441// PIC16:typedef unsigned char uint8_t;
442// PIC16:typedef int8_t int_least8_t;
443// PIC16:typedef uint8_t uint_least8_t;
444// PIC16:typedef int8_t int_fast8_t;
445// PIC16:typedef uint8_t uint_fast8_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000446//
Ken Dyck08321b42009-11-18 20:24:13 +0000447// PIC16:typedef int16_t intptr_t;
448// PIC16:typedef uint16_t uintptr_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000449//
Daniel Dunbar96d38c12010-06-30 06:30:50 +0000450// PIC16:typedef long int intmax_t;
451// PIC16:typedef long unsigned int uintmax_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000452//
453// PIC16:INT8_MAX_ 127
Ken Dyckb0887562009-11-17 18:29:12 +0000454// PIC16:INT8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000455// PIC16:UINT8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000456// PIC16:INT_LEAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000457// PIC16:INT_LEAST8_MAX_ 127
458// PIC16:UINT_LEAST8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000459// PIC16:INT_FAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000460// PIC16:INT_FAST8_MAX_ 127
461// PIC16:UINT_FAST8_MAX_ 255
462//
463// PIC16:INT16_MAX_ 32767
Ken Dyckb0887562009-11-17 18:29:12 +0000464// PIC16:INT16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000465// PIC16:UINT16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000466// PIC16:INT_LEAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000467// PIC16:INT_LEAST16_MAX_ 32767
468// PIC16:UINT_LEAST16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000469// PIC16:INT_FAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000470// PIC16:INT_FAST16_MAX_ 32767
471// PIC16:UINT_FAST16_MAX_ 65535
472//
Ken Dyck81638412009-11-17 16:26:27 +0000473// PIC16:INT32_MAX_ 2147483647L
474// PIC16:INT32_MIN_ (-2147483647L -1)
475// PIC16:UINT32_MAX_ 4294967295UL
476// PIC16:INT_LEAST32_MIN_ (-2147483647L -1)
477// PIC16:INT_LEAST32_MAX_ 2147483647L
478// PIC16:UINT_LEAST32_MAX_ 4294967295UL
479// PIC16:INT_FAST32_MIN_ (-2147483647L -1)
480// PIC16:INT_FAST32_MAX_ 2147483647L
481// PIC16:UINT_FAST32_MAX_ 4294967295UL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000482//
483// PIC16:INT64_MAX_ INT64_MAX
484// PIC16:INT64_MIN_ INT64_MIN
485// PIC16:UINT64_MAX_ UINT64_MAX
486// PIC16:INT_LEAST64_MIN_ INT_LEAST64_MIN
487// PIC16:INT_LEAST64_MAX_ INT_LEAST64_MAX
488// PIC16:UINT_LEAST64_MAX_ UINT_LEAST64_MAX
489// PIC16:INT_FAST64_MIN_ INT_FAST64_MIN
490// PIC16:INT_FAST64_MAX_ INT_FAST64_MAX
491// PIC16:UINT_FAST64_MAX_ UINT_FAST64_MAX
492//
Ken Dyckb0887562009-11-17 18:29:12 +0000493// PIC16:INTPTR_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000494// PIC16:INTPTR_MAX_ 32767
495// PIC16:UINTPTR_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000496// PIC16:PTRDIFF_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000497// PIC16:PTRDIFF_MAX_ 32767
498// PIC16:SIZE_MAX_ 65535
499//
500// PIC16:INTMAX_MIN_ (-2147483647L -1)
501// PIC16:INTMAX_MAX_ 2147483647L
Ken Dyckdb57ce52009-11-18 19:22:15 +0000502// PIC16:UINTMAX_MAX_ 4294967295UL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000503//
Ken Dyck81638412009-11-17 16:26:27 +0000504// PIC16:SIG_ATOMIC_MIN_ (-2147483647L -1)
505// PIC16:SIG_ATOMIC_MAX_ 2147483647L
Ken Dyckbfec4b02009-11-19 14:35:19 +0000506// PIC16:WINT_MIN_ (-32767 -1)
507// PIC16:WINT_MAX_ 32767
Chris Lattnerbceaf862009-10-29 04:55:36 +0000508//
Chris Lattner91846462009-11-12 08:04:33 +0000509// PIC16:WCHAR_MAX_ 32767
510// PIC16:WCHAR_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000511//
Ken Dyck6ab25f42009-11-17 13:54:02 +0000512// PIC16:INT8_C_(0) 0
513// PIC16:UINT8_C_(0) 0U
514// PIC16:INT16_C_(0) 0
515// PIC16:UINT16_C_(0) 0U
516// PIC16:INT32_C_(0) 0L
517// PIC16:UINT32_C_(0) 0UL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000518// PIC16:INT64_C_(0) INT64_C(0)
519// PIC16:UINT64_C_(0) UINT64_C(0)
520//
Ken Dyck832b7102009-11-18 19:42:57 +0000521// PIC16:INTMAX_C_(0) 0L
522// PIC16:UINTMAX_C_(0) 0UL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000523//
Daniel Dunbara5728872009-12-15 20:14:24 +0000524// RUN: %clang_cc1 -E -ffreestanding -triple=powerpc64-none-none %s | FileCheck -check-prefix PPC64 %s
Chris Lattnerbceaf862009-10-29 04:55:36 +0000525//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000526// PPC64:typedef signed long int int64_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000527// PPC64:typedef unsigned long int uint64_t;
528// PPC64:typedef int64_t int_least64_t;
529// PPC64:typedef uint64_t uint_least64_t;
530// PPC64:typedef int64_t int_fast64_t;
531// PPC64:typedef uint64_t uint_fast64_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000532//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000533// PPC64:typedef signed int int32_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000534// PPC64:typedef unsigned int uint32_t;
535// PPC64:typedef int32_t int_least32_t;
536// PPC64:typedef uint32_t uint_least32_t;
537// PPC64:typedef int32_t int_fast32_t;
538// PPC64:typedef uint32_t uint_fast32_t;
539//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000540// PPC64:typedef signed short int16_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000541// PPC64:typedef unsigned short uint16_t;
542// PPC64:typedef int16_t int_least16_t;
543// PPC64:typedef uint16_t uint_least16_t;
544// PPC64:typedef int16_t int_fast16_t;
545// PPC64:typedef uint16_t uint_fast16_t;
546//
547// PPC64:typedef signed char int8_t;
548// PPC64:typedef unsigned char uint8_t;
549// PPC64:typedef int8_t int_least8_t;
550// PPC64:typedef uint8_t uint_least8_t;
551// PPC64:typedef int8_t int_fast8_t;
552// PPC64:typedef uint8_t uint_fast8_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000553//
Ken Dyck08321b42009-11-18 20:24:13 +0000554// PPC64:typedef int64_t intptr_t;
555// PPC64:typedef uint64_t uintptr_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000556//
Daniel Dunbar96d38c12010-06-30 06:30:50 +0000557// PPC64:typedef long int intmax_t;
558// PPC64:typedef long unsigned int uintmax_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000559//
560// PPC64:INT8_MAX_ 127
Ken Dyckb0887562009-11-17 18:29:12 +0000561// PPC64:INT8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000562// PPC64:UINT8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000563// PPC64:INT_LEAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000564// PPC64:INT_LEAST8_MAX_ 127
565// PPC64:UINT_LEAST8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000566// PPC64:INT_FAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000567// PPC64:INT_FAST8_MAX_ 127
568// PPC64:UINT_FAST8_MAX_ 255
569//
570// PPC64:INT16_MAX_ 32767
Ken Dyckb0887562009-11-17 18:29:12 +0000571// PPC64:INT16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000572// PPC64:UINT16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000573// PPC64:INT_LEAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000574// PPC64:INT_LEAST16_MAX_ 32767
575// PPC64:UINT_LEAST16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000576// PPC64:INT_FAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000577// PPC64:INT_FAST16_MAX_ 32767
578// PPC64:UINT_FAST16_MAX_ 65535
579//
580// PPC64:INT32_MAX_ 2147483647
581// PPC64:INT32_MIN_ (-2147483647 -1)
582// PPC64:UINT32_MAX_ 4294967295U
583// PPC64:INT_LEAST32_MIN_ (-2147483647 -1)
584// PPC64:INT_LEAST32_MAX_ 2147483647
585// PPC64:UINT_LEAST32_MAX_ 4294967295U
586// PPC64:INT_FAST32_MIN_ (-2147483647 -1)
587// PPC64:INT_FAST32_MAX_ 2147483647
588// PPC64:UINT_FAST32_MAX_ 4294967295U
589//
Ken Dyck81638412009-11-17 16:26:27 +0000590// PPC64:INT64_MAX_ 9223372036854775807L
591// PPC64:INT64_MIN_ (-9223372036854775807L -1)
592// PPC64:UINT64_MAX_ 18446744073709551615UL
593// PPC64:INT_LEAST64_MIN_ (-9223372036854775807L -1)
594// PPC64:INT_LEAST64_MAX_ 9223372036854775807L
595// PPC64:UINT_LEAST64_MAX_ 18446744073709551615UL
596// PPC64:INT_FAST64_MIN_ (-9223372036854775807L -1)
597// PPC64:INT_FAST64_MAX_ 9223372036854775807L
598// PPC64:UINT_FAST64_MAX_ 18446744073709551615UL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000599//
Ken Dyck81638412009-11-17 16:26:27 +0000600// PPC64:INTPTR_MIN_ (-9223372036854775807L -1)
601// PPC64:INTPTR_MAX_ 9223372036854775807L
602// PPC64:UINTPTR_MAX_ 18446744073709551615UL
603// PPC64:PTRDIFF_MIN_ (-9223372036854775807L -1)
604// PPC64:PTRDIFF_MAX_ 9223372036854775807L
605// PPC64:SIZE_MAX_ 18446744073709551615UL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000606//
607// PPC64:INTMAX_MIN_ (-9223372036854775807L -1)
608// PPC64:INTMAX_MAX_ 9223372036854775807L
Ken Dyckdb57ce52009-11-18 19:22:15 +0000609// PPC64:UINTMAX_MAX_ 18446744073709551615UL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000610//
611// PPC64:SIG_ATOMIC_MIN_ (-2147483647 -1)
612// PPC64:SIG_ATOMIC_MAX_ 2147483647
613// PPC64:WINT_MIN_ (-2147483647 -1)
614// PPC64:WINT_MAX_ 2147483647
615//
616// PPC64:WCHAR_MAX_ 2147483647
617// PPC64:WCHAR_MIN_ (-2147483647 -1)
618//
Ken Dyck6ab25f42009-11-17 13:54:02 +0000619// PPC64:INT8_C_(0) 0
620// PPC64:UINT8_C_(0) 0U
621// PPC64:INT16_C_(0) 0
622// PPC64:UINT16_C_(0) 0U
623// PPC64:INT32_C_(0) 0
624// PPC64:UINT32_C_(0) 0U
625// PPC64:INT64_C_(0) 0L
626// PPC64:UINT64_C_(0) 0UL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000627//
Ken Dyck832b7102009-11-18 19:42:57 +0000628// PPC64:INTMAX_C_(0) 0L
629// PPC64:UINTMAX_C_(0) 0UL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000630//
Daniel Dunbara5728872009-12-15 20:14:24 +0000631// RUN: %clang_cc1 -E -ffreestanding -triple=powerpc-none-none %s | FileCheck -check-prefix PPC %s
Chris Lattnerbceaf862009-10-29 04:55:36 +0000632//
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000633//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000634// PPC:typedef signed long long int int64_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000635// PPC:typedef unsigned long long int uint64_t;
636// PPC:typedef int64_t int_least64_t;
637// PPC:typedef uint64_t uint_least64_t;
638// PPC:typedef int64_t int_fast64_t;
639// PPC:typedef uint64_t uint_fast64_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000640//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000641// PPC:typedef signed int int32_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000642// PPC:typedef unsigned int uint32_t;
643// PPC:typedef int32_t int_least32_t;
644// PPC:typedef uint32_t uint_least32_t;
645// PPC:typedef int32_t int_fast32_t;
646// PPC:typedef uint32_t uint_fast32_t;
647//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000648// PPC:typedef signed short int16_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000649// PPC:typedef unsigned short uint16_t;
650// PPC:typedef int16_t int_least16_t;
651// PPC:typedef uint16_t uint_least16_t;
652// PPC:typedef int16_t int_fast16_t;
653// PPC:typedef uint16_t uint_fast16_t;
654//
655// PPC:typedef signed char int8_t;
656// PPC:typedef unsigned char uint8_t;
657// PPC:typedef int8_t int_least8_t;
658// PPC:typedef uint8_t uint_least8_t;
659// PPC:typedef int8_t int_fast8_t;
660// PPC:typedef uint8_t uint_fast8_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000661//
Ken Dyck08321b42009-11-18 20:24:13 +0000662// PPC:typedef int32_t intptr_t;
663// PPC:typedef uint32_t uintptr_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000664//
Daniel Dunbar96d38c12010-06-30 06:30:50 +0000665// PPC:typedef long long int intmax_t;
666// PPC:typedef long long unsigned int uintmax_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000667//
668// PPC:INT8_MAX_ 127
Ken Dyckb0887562009-11-17 18:29:12 +0000669// PPC:INT8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000670// PPC:UINT8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000671// PPC:INT_LEAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000672// PPC:INT_LEAST8_MAX_ 127
673// PPC:UINT_LEAST8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000674// PPC:INT_FAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000675// PPC:INT_FAST8_MAX_ 127
676// PPC:UINT_FAST8_MAX_ 255
677//
678// PPC:INT16_MAX_ 32767
Ken Dyckb0887562009-11-17 18:29:12 +0000679// PPC:INT16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000680// PPC:UINT16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000681// PPC:INT_LEAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000682// PPC:INT_LEAST16_MAX_ 32767
683// PPC:UINT_LEAST16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000684// PPC:INT_FAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000685// PPC:INT_FAST16_MAX_ 32767
686// PPC:UINT_FAST16_MAX_ 65535
687//
688// PPC:INT32_MAX_ 2147483647
689// PPC:INT32_MIN_ (-2147483647 -1)
690// PPC:UINT32_MAX_ 4294967295U
691// PPC:INT_LEAST32_MIN_ (-2147483647 -1)
692// PPC:INT_LEAST32_MAX_ 2147483647
693// PPC:UINT_LEAST32_MAX_ 4294967295U
694// PPC:INT_FAST32_MIN_ (-2147483647 -1)
695// PPC:INT_FAST32_MAX_ 2147483647
696// PPC:UINT_FAST32_MAX_ 4294967295U
697//
698// PPC:INT64_MAX_ 9223372036854775807LL
699// PPC:INT64_MIN_ (-9223372036854775807LL -1)
700// PPC:UINT64_MAX_ 18446744073709551615ULL
701// PPC:INT_LEAST64_MIN_ (-9223372036854775807LL -1)
702// PPC:INT_LEAST64_MAX_ 9223372036854775807LL
703// PPC:UINT_LEAST64_MAX_ 18446744073709551615ULL
704// PPC:INT_FAST64_MIN_ (-9223372036854775807LL -1)
705// PPC:INT_FAST64_MAX_ 9223372036854775807LL
706// PPC:UINT_FAST64_MAX_ 18446744073709551615ULL
707//
708// PPC:INTPTR_MIN_ (-2147483647 -1)
709// PPC:INTPTR_MAX_ 2147483647
710// PPC:UINTPTR_MAX_ 4294967295U
711// PPC:PTRDIFF_MIN_ (-2147483647 -1)
712// PPC:PTRDIFF_MAX_ 2147483647
713// PPC:SIZE_MAX_ 4294967295U
714//
715// PPC:INTMAX_MIN_ (-9223372036854775807LL -1)
716// PPC:INTMAX_MAX_ 9223372036854775807LL
Ken Dyckdb57ce52009-11-18 19:22:15 +0000717// PPC:UINTMAX_MAX_ 18446744073709551615ULL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000718//
719// PPC:SIG_ATOMIC_MIN_ (-2147483647 -1)
720// PPC:SIG_ATOMIC_MAX_ 2147483647
721// PPC:WINT_MIN_ (-2147483647 -1)
722// PPC:WINT_MAX_ 2147483647
723//
724// PPC:WCHAR_MAX_ 2147483647
725// PPC:WCHAR_MIN_ (-2147483647 -1)
726//
Ken Dyck6ab25f42009-11-17 13:54:02 +0000727// PPC:INT8_C_(0) 0
728// PPC:UINT8_C_(0) 0U
729// PPC:INT16_C_(0) 0
730// PPC:UINT16_C_(0) 0U
731// PPC:INT32_C_(0) 0
732// PPC:UINT32_C_(0) 0U
733// PPC:INT64_C_(0) 0LL
734// PPC:UINT64_C_(0) 0ULL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000735//
Ken Dyck6ab25f42009-11-17 13:54:02 +0000736// PPC:INTMAX_C_(0) 0LL
737// PPC:UINTMAX_C_(0) 0ULL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000738//
Daniel Dunbara5728872009-12-15 20:14:24 +0000739// RUN: %clang_cc1 -E -ffreestanding -triple=s390x-none-none %s | FileCheck -check-prefix S390X %s
Chris Lattnerbceaf862009-10-29 04:55:36 +0000740//
Daniel Dunbar7f3a5452010-06-30 06:30:56 +0000741// S390X:typedef signed long long int int64_t;
742// S390X:typedef unsigned long long int uint64_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000743// S390X:typedef int64_t int_least64_t;
744// S390X:typedef uint64_t uint_least64_t;
745// S390X:typedef int64_t int_fast64_t;
746// S390X:typedef uint64_t uint_fast64_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000747//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000748// S390X:typedef signed int int32_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000749// S390X:typedef unsigned int uint32_t;
750// S390X:typedef int32_t int_least32_t;
751// S390X:typedef uint32_t uint_least32_t;
752// S390X:typedef int32_t int_fast32_t;
753// S390X:typedef uint32_t uint_fast32_t;
754//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000755// S390X:typedef signed short int16_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000756// S390X:typedef unsigned short uint16_t;
757// S390X:typedef int16_t int_least16_t;
758// S390X:typedef uint16_t uint_least16_t;
759// S390X:typedef int16_t int_fast16_t;
760// S390X:typedef uint16_t uint_fast16_t;
761//
762// S390X:typedef signed char int8_t;
763// S390X:typedef unsigned char uint8_t;
764// S390X:typedef int8_t int_least8_t;
765// S390X:typedef uint8_t uint_least8_t;
766// S390X:typedef int8_t int_fast8_t;
767// S390X:typedef uint8_t uint_fast8_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000768//
Ken Dyck08321b42009-11-18 20:24:13 +0000769// S390X:typedef int64_t intptr_t;
770// S390X:typedef uint64_t uintptr_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000771//
Daniel Dunbar96d38c12010-06-30 06:30:50 +0000772// S390X:typedef long long int intmax_t;
773// S390X:typedef long long unsigned int uintmax_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000774//
775// S390X:INT8_MAX_ 127
Ken Dyckb0887562009-11-17 18:29:12 +0000776// S390X:INT8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000777// S390X:UINT8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000778// S390X:INT_LEAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000779// S390X:INT_LEAST8_MAX_ 127
780// S390X:UINT_LEAST8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000781// S390X:INT_FAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000782// S390X:INT_FAST8_MAX_ 127
783// S390X:UINT_FAST8_MAX_ 255
784//
785// S390X:INT16_MAX_ 32767
Ken Dyckb0887562009-11-17 18:29:12 +0000786// S390X:INT16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000787// S390X:UINT16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000788// S390X:INT_LEAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000789// S390X:INT_LEAST16_MAX_ 32767
790// S390X:UINT_LEAST16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000791// S390X:INT_FAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000792// S390X:INT_FAST16_MAX_ 32767
793// S390X:UINT_FAST16_MAX_ 65535
794//
795// S390X:INT32_MAX_ 2147483647
796// S390X:INT32_MIN_ (-2147483647 -1)
797// S390X:UINT32_MAX_ 4294967295U
798// S390X:INT_LEAST32_MIN_ (-2147483647 -1)
799// S390X:INT_LEAST32_MAX_ 2147483647
800// S390X:UINT_LEAST32_MAX_ 4294967295U
801// S390X:INT_FAST32_MIN_ (-2147483647 -1)
802// S390X:INT_FAST32_MAX_ 2147483647
803// S390X:UINT_FAST32_MAX_ 4294967295U
804//
Ken Dyck81638412009-11-17 16:26:27 +0000805// S390X:INT64_MAX_ 9223372036854775807L
Daniel Dunbar7f3a5452010-06-30 06:30:56 +0000806// S390X:INT64_MIN_ (-9223372036854775807LL -1)
Ken Dyck81638412009-11-17 16:26:27 +0000807// S390X:UINT64_MAX_ 18446744073709551615UL
Daniel Dunbar7f3a5452010-06-30 06:30:56 +0000808// S390X:INT_LEAST64_MIN_ (-9223372036854775807LL -1)
Ken Dyck81638412009-11-17 16:26:27 +0000809// S390X:INT_LEAST64_MAX_ 9223372036854775807L
810// S390X:UINT_LEAST64_MAX_ 18446744073709551615UL
Daniel Dunbar7f3a5452010-06-30 06:30:56 +0000811// S390X:INT_FAST64_MIN_ (-9223372036854775807LL -1)
Ken Dyck81638412009-11-17 16:26:27 +0000812// S390X:INT_FAST64_MAX_ 9223372036854775807L
813// S390X:UINT_FAST64_MAX_ 18446744073709551615UL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000814//
Daniel Dunbar7f3a5452010-06-30 06:30:56 +0000815// S390X:INTPTR_MIN_ (-9223372036854775807LL -1)
Ken Dyck81638412009-11-17 16:26:27 +0000816// S390X:INTPTR_MAX_ 9223372036854775807L
817// S390X:UINTPTR_MAX_ 18446744073709551615UL
Daniel Dunbar7f3a5452010-06-30 06:30:56 +0000818// S390X:PTRDIFF_MIN_ (-9223372036854775807LL -1)
Ken Dyck81638412009-11-17 16:26:27 +0000819// S390X:PTRDIFF_MAX_ 9223372036854775807L
820// S390X:SIZE_MAX_ 18446744073709551615UL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000821//
Daniel Dunbar7f3a5452010-06-30 06:30:56 +0000822// S390X:INTMAX_MIN_ (-9223372036854775807LL -1)
Ken Dyckdb57ce52009-11-18 19:22:15 +0000823// S390X:INTMAX_MAX_ 9223372036854775807L
824// S390X:UINTMAX_MAX_ 18446744073709551615UL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000825//
826// S390X:SIG_ATOMIC_MIN_ (-2147483647 -1)
827// S390X:SIG_ATOMIC_MAX_ 2147483647
828// S390X:WINT_MIN_ (-2147483647 -1)
829// S390X:WINT_MAX_ 2147483647
830//
831// S390X:WCHAR_MAX_ 2147483647
832// S390X:WCHAR_MIN_ (-2147483647 -1)
833//
Ken Dyck6ab25f42009-11-17 13:54:02 +0000834// S390X:INT8_C_(0) 0
835// S390X:UINT8_C_(0) 0U
836// S390X:INT16_C_(0) 0
837// S390X:UINT16_C_(0) 0U
838// S390X:INT32_C_(0) 0
839// S390X:UINT32_C_(0) 0U
840// S390X:INT64_C_(0) 0L
841// S390X:UINT64_C_(0) 0UL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000842//
Ken Dyck832b7102009-11-18 19:42:57 +0000843// S390X:INTMAX_C_(0) 0L
844// S390X:UINTMAX_C_(0) 0UL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000845//
Daniel Dunbara5728872009-12-15 20:14:24 +0000846// RUN: %clang_cc1 -E -ffreestanding -triple=sparc-none-none %s | FileCheck -check-prefix SPARC %s
Chris Lattnerbceaf862009-10-29 04:55:36 +0000847//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000848// SPARC:typedef signed long long int int64_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000849// SPARC:typedef unsigned long long int uint64_t;
850// SPARC:typedef int64_t int_least64_t;
851// SPARC:typedef uint64_t uint_least64_t;
852// SPARC:typedef int64_t int_fast64_t;
853// SPARC:typedef uint64_t uint_fast64_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000854//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000855// SPARC:typedef signed int int32_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000856// SPARC:typedef unsigned int uint32_t;
857// SPARC:typedef int32_t int_least32_t;
858// SPARC:typedef uint32_t uint_least32_t;
859// SPARC:typedef int32_t int_fast32_t;
860// SPARC:typedef uint32_t uint_fast32_t;
861//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000862// SPARC:typedef signed short int16_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000863// SPARC:typedef unsigned short uint16_t;
864// SPARC:typedef int16_t int_least16_t;
865// SPARC:typedef uint16_t uint_least16_t;
866// SPARC:typedef int16_t int_fast16_t;
867// SPARC:typedef uint16_t uint_fast16_t;
868//
869// SPARC:typedef signed char int8_t;
870// SPARC:typedef unsigned char uint8_t;
871// SPARC:typedef int8_t int_least8_t;
872// SPARC:typedef uint8_t uint_least8_t;
873// SPARC:typedef int8_t int_fast8_t;
874// SPARC:typedef uint8_t uint_fast8_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000875//
Ken Dyck08321b42009-11-18 20:24:13 +0000876// SPARC:typedef int32_t intptr_t;
877// SPARC:typedef uint32_t uintptr_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000878//
Daniel Dunbar96d38c12010-06-30 06:30:50 +0000879// SPARC:typedef long long int intmax_t;
880// SPARC:typedef long long unsigned int uintmax_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000881//
882// SPARC:INT8_MAX_ 127
Ken Dyckb0887562009-11-17 18:29:12 +0000883// SPARC:INT8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000884// SPARC:UINT8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000885// SPARC:INT_LEAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000886// SPARC:INT_LEAST8_MAX_ 127
887// SPARC:UINT_LEAST8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000888// SPARC:INT_FAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000889// SPARC:INT_FAST8_MAX_ 127
890// SPARC:UINT_FAST8_MAX_ 255
891//
892// SPARC:INT16_MAX_ 32767
Ken Dyckb0887562009-11-17 18:29:12 +0000893// SPARC:INT16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000894// SPARC:UINT16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000895// SPARC:INT_LEAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000896// SPARC:INT_LEAST16_MAX_ 32767
897// SPARC:UINT_LEAST16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000898// SPARC:INT_FAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000899// SPARC:INT_FAST16_MAX_ 32767
900// SPARC:UINT_FAST16_MAX_ 65535
901//
902// SPARC:INT32_MAX_ 2147483647
903// SPARC:INT32_MIN_ (-2147483647 -1)
904// SPARC:UINT32_MAX_ 4294967295U
905// SPARC:INT_LEAST32_MIN_ (-2147483647 -1)
906// SPARC:INT_LEAST32_MAX_ 2147483647
907// SPARC:UINT_LEAST32_MAX_ 4294967295U
908// SPARC:INT_FAST32_MIN_ (-2147483647 -1)
909// SPARC:INT_FAST32_MAX_ 2147483647
910// SPARC:UINT_FAST32_MAX_ 4294967295U
911//
912// SPARC:INT64_MAX_ 9223372036854775807LL
913// SPARC:INT64_MIN_ (-9223372036854775807LL -1)
914// SPARC:UINT64_MAX_ 18446744073709551615ULL
915// SPARC:INT_LEAST64_MIN_ (-9223372036854775807LL -1)
916// SPARC:INT_LEAST64_MAX_ 9223372036854775807LL
917// SPARC:UINT_LEAST64_MAX_ 18446744073709551615ULL
918// SPARC:INT_FAST64_MIN_ (-9223372036854775807LL -1)
919// SPARC:INT_FAST64_MAX_ 9223372036854775807LL
920// SPARC:UINT_FAST64_MAX_ 18446744073709551615ULL
921//
922// SPARC:INTPTR_MIN_ (-2147483647 -1)
923// SPARC:INTPTR_MAX_ 2147483647
924// SPARC:UINTPTR_MAX_ 4294967295U
925// SPARC:PTRDIFF_MIN_ (-2147483647 -1)
926// SPARC:PTRDIFF_MAX_ 2147483647
927// SPARC:SIZE_MAX_ 4294967295U
928//
929// SPARC:INTMAX_MIN_ (-9223372036854775807LL -1)
930// SPARC:INTMAX_MAX_ 9223372036854775807LL
Ken Dyckdb57ce52009-11-18 19:22:15 +0000931// SPARC:UINTMAX_MAX_ 18446744073709551615ULL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000932//
933// SPARC:SIG_ATOMIC_MIN_ (-2147483647 -1)
934// SPARC:SIG_ATOMIC_MAX_ 2147483647
935// SPARC:WINT_MIN_ (-2147483647 -1)
936// SPARC:WINT_MAX_ 2147483647
937//
938// SPARC:WCHAR_MAX_ 2147483647
939// SPARC:WCHAR_MIN_ (-2147483647 -1)
940//
Ken Dyck6ab25f42009-11-17 13:54:02 +0000941// SPARC:INT8_C_(0) 0
942// SPARC:UINT8_C_(0) 0U
943// SPARC:INT16_C_(0) 0
944// SPARC:UINT16_C_(0) 0U
945// SPARC:INT32_C_(0) 0
946// SPARC:UINT32_C_(0) 0U
947// SPARC:INT64_C_(0) 0LL
948// SPARC:UINT64_C_(0) 0ULL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000949//
Ken Dyck6ab25f42009-11-17 13:54:02 +0000950// SPARC:INTMAX_C_(0) 0LL
951// SPARC:UINTMAX_C_(0) 0ULL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000952//
Daniel Dunbara5728872009-12-15 20:14:24 +0000953// RUN: %clang_cc1 -E -ffreestanding -triple=tce-none-none %s | FileCheck -check-prefix TCE %s
Chris Lattnerbceaf862009-10-29 04:55:36 +0000954//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000955// TCE:typedef signed int int32_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000956// TCE:typedef unsigned int uint32_t;
957// TCE:typedef int32_t int_least32_t;
958// TCE:typedef uint32_t uint_least32_t;
959// TCE:typedef int32_t int_fast32_t;
960// TCE:typedef uint32_t uint_fast32_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000961//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000962// TCE:typedef signed short int16_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000963// TCE:typedef unsigned short uint16_t;
964// TCE:typedef int16_t int_least16_t;
965// TCE:typedef uint16_t uint_least16_t;
966// TCE:typedef int16_t int_fast16_t;
967// TCE:typedef uint16_t uint_fast16_t;
968//
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000969// TCE:typedef signed char int8_t;
970// TCE:typedef unsigned char uint8_t;
971// TCE:typedef int8_t int_least8_t;
972// TCE:typedef uint8_t uint_least8_t;
973// TCE:typedef int8_t int_fast8_t;
974// TCE:typedef uint8_t uint_fast8_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000975//
Ken Dyck08321b42009-11-18 20:24:13 +0000976// TCE:typedef int32_t intptr_t;
977// TCE:typedef uint32_t uintptr_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000978//
Daniel Dunbar96d38c12010-06-30 06:30:50 +0000979// TCE:typedef long int intmax_t;
980// TCE:typedef long unsigned int uintmax_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000981//
982// TCE:INT8_MAX_ 127
Ken Dyckb0887562009-11-17 18:29:12 +0000983// TCE:INT8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000984// TCE:UINT8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000985// TCE:INT_LEAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000986// TCE:INT_LEAST8_MAX_ 127
987// TCE:UINT_LEAST8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000988// TCE:INT_FAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000989// TCE:INT_FAST8_MAX_ 127
990// TCE:UINT_FAST8_MAX_ 255
991//
992// TCE:INT16_MAX_ 32767
Ken Dyckb0887562009-11-17 18:29:12 +0000993// TCE:INT16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000994// TCE:UINT16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000995// TCE:INT_LEAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000996// TCE:INT_LEAST16_MAX_ 32767
997// TCE:UINT_LEAST16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000998// TCE:INT_FAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000999// TCE:INT_FAST16_MAX_ 32767
1000// TCE:UINT_FAST16_MAX_ 65535
1001//
1002// TCE:INT32_MAX_ 2147483647
1003// TCE:INT32_MIN_ (-2147483647 -1)
1004// TCE:UINT32_MAX_ 4294967295U
1005// TCE:INT_LEAST32_MIN_ (-2147483647 -1)
1006// TCE:INT_LEAST32_MAX_ 2147483647
1007// TCE:UINT_LEAST32_MAX_ 4294967295U
1008// TCE:INT_FAST32_MIN_ (-2147483647 -1)
1009// TCE:INT_FAST32_MAX_ 2147483647
1010// TCE:UINT_FAST32_MAX_ 4294967295U
1011//
1012// TCE:INT64_MAX_ INT64_MAX
1013// TCE:INT64_MIN_ INT64_MIN
1014// TCE:UINT64_MAX_ UINT64_MAX
1015// TCE:INT_LEAST64_MIN_ INT_LEAST64_MIN
1016// TCE:INT_LEAST64_MAX_ INT_LEAST64_MAX
1017// TCE:UINT_LEAST64_MAX_ UINT_LEAST64_MAX
1018// TCE:INT_FAST64_MIN_ INT_FAST64_MIN
1019// TCE:INT_FAST64_MAX_ INT_FAST64_MAX
1020// TCE:UINT_FAST64_MAX_ UINT_FAST64_MAX
1021//
1022// TCE:INTPTR_MIN_ (-2147483647 -1)
1023// TCE:INTPTR_MAX_ 2147483647
1024// TCE:UINTPTR_MAX_ 4294967295U
1025// TCE:PTRDIFF_MIN_ (-2147483647 -1)
1026// TCE:PTRDIFF_MAX_ 2147483647
1027// TCE:SIZE_MAX_ 4294967295U
1028//
Ken Dyckdb57ce52009-11-18 19:22:15 +00001029// TCE:INTMAX_MIN_ (-2147483647 -1)
1030// TCE:INTMAX_MAX_ 2147483647
1031// TCE:UINTMAX_MAX_ 4294967295U
Chris Lattnerbceaf862009-10-29 04:55:36 +00001032//
1033// TCE:SIG_ATOMIC_MIN_ (-2147483647 -1)
1034// TCE:SIG_ATOMIC_MAX_ 2147483647
1035// TCE:WINT_MIN_ (-2147483647 -1)
1036// TCE:WINT_MAX_ 2147483647
1037//
1038// TCE:WCHAR_MAX_ 2147483647
1039// TCE:WCHAR_MIN_ (-2147483647 -1)
1040//
Ken Dyck6ab25f42009-11-17 13:54:02 +00001041// TCE:INT8_C_(0) 0
1042// TCE:UINT8_C_(0) 0U
1043// TCE:INT16_C_(0) 0
1044// TCE:UINT16_C_(0) 0U
1045// TCE:INT32_C_(0) 0
1046// TCE:UINT32_C_(0) 0U
Chris Lattnerbceaf862009-10-29 04:55:36 +00001047// TCE:INT64_C_(0) INT64_C(0)
1048// TCE:UINT64_C_(0) UINT64_C(0)
1049//
Ken Dyck832b7102009-11-18 19:42:57 +00001050// TCE:INTMAX_C_(0) 0
1051// TCE:UINTMAX_C_(0) 0U
Chris Lattnerbceaf862009-10-29 04:55:36 +00001052//
Daniel Dunbara5728872009-12-15 20:14:24 +00001053// RUN: %clang_cc1 -E -ffreestanding -triple=x86_64-none-none %s | FileCheck -check-prefix X86_64 %s
Chris Lattnerbceaf862009-10-29 04:55:36 +00001054//
Chris Lattner06dcf6b2009-11-04 23:03:18 +00001055//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +00001056// X86_64:typedef signed long int int64_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +00001057// X86_64:typedef unsigned long int uint64_t;
1058// X86_64:typedef int64_t int_least64_t;
1059// X86_64:typedef uint64_t uint_least64_t;
1060// X86_64:typedef int64_t int_fast64_t;
1061// X86_64:typedef uint64_t uint_fast64_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +00001062//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +00001063// X86_64:typedef signed int int32_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +00001064// X86_64:typedef unsigned int uint32_t;
1065// X86_64:typedef int32_t int_least32_t;
1066// X86_64:typedef uint32_t uint_least32_t;
1067// X86_64:typedef int32_t int_fast32_t;
1068// X86_64:typedef uint32_t uint_fast32_t;
1069//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +00001070// X86_64:typedef signed short int16_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +00001071// X86_64:typedef unsigned short uint16_t;
1072// X86_64:typedef int16_t int_least16_t;
1073// X86_64:typedef uint16_t uint_least16_t;
1074// X86_64:typedef int16_t int_fast16_t;
1075// X86_64:typedef uint16_t uint_fast16_t;
1076//
1077// X86_64:typedef signed char int8_t;
1078// X86_64:typedef unsigned char uint8_t;
1079// X86_64:typedef int8_t int_least8_t;
1080// X86_64:typedef uint8_t uint_least8_t;
1081// X86_64:typedef int8_t int_fast8_t;
1082// X86_64:typedef uint8_t uint_fast8_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +00001083//
Ken Dyck08321b42009-11-18 20:24:13 +00001084// X86_64:typedef int64_t intptr_t;
1085// X86_64:typedef uint64_t uintptr_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +00001086//
Daniel Dunbar96d38c12010-06-30 06:30:50 +00001087// X86_64:typedef long int intmax_t;
1088// X86_64:typedef long unsigned int uintmax_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +00001089//
1090// X86_64:INT8_MAX_ 127
Ken Dyckb0887562009-11-17 18:29:12 +00001091// X86_64:INT8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +00001092// X86_64:UINT8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +00001093// X86_64:INT_LEAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +00001094// X86_64:INT_LEAST8_MAX_ 127
1095// X86_64:UINT_LEAST8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +00001096// X86_64:INT_FAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +00001097// X86_64:INT_FAST8_MAX_ 127
1098// X86_64:UINT_FAST8_MAX_ 255
1099//
1100// X86_64:INT16_MAX_ 32767
Ken Dyckb0887562009-11-17 18:29:12 +00001101// X86_64:INT16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +00001102// X86_64:UINT16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +00001103// X86_64:INT_LEAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +00001104// X86_64:INT_LEAST16_MAX_ 32767
1105// X86_64:UINT_LEAST16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +00001106// X86_64:INT_FAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +00001107// X86_64:INT_FAST16_MAX_ 32767
1108// X86_64:UINT_FAST16_MAX_ 65535
1109//
1110// X86_64:INT32_MAX_ 2147483647
1111// X86_64:INT32_MIN_ (-2147483647 -1)
1112// X86_64:UINT32_MAX_ 4294967295U
1113// X86_64:INT_LEAST32_MIN_ (-2147483647 -1)
1114// X86_64:INT_LEAST32_MAX_ 2147483647
1115// X86_64:UINT_LEAST32_MAX_ 4294967295U
1116// X86_64:INT_FAST32_MIN_ (-2147483647 -1)
1117// X86_64:INT_FAST32_MAX_ 2147483647
1118// X86_64:UINT_FAST32_MAX_ 4294967295U
1119//
Ken Dyck81638412009-11-17 16:26:27 +00001120// X86_64:INT64_MAX_ 9223372036854775807L
1121// X86_64:INT64_MIN_ (-9223372036854775807L -1)
1122// X86_64:UINT64_MAX_ 18446744073709551615UL
1123// X86_64:INT_LEAST64_MIN_ (-9223372036854775807L -1)
1124// X86_64:INT_LEAST64_MAX_ 9223372036854775807L
1125// X86_64:UINT_LEAST64_MAX_ 18446744073709551615UL
1126// X86_64:INT_FAST64_MIN_ (-9223372036854775807L -1)
1127// X86_64:INT_FAST64_MAX_ 9223372036854775807L
1128// X86_64:UINT_FAST64_MAX_ 18446744073709551615UL
Chris Lattnerbceaf862009-10-29 04:55:36 +00001129//
Ken Dyck81638412009-11-17 16:26:27 +00001130// X86_64:INTPTR_MIN_ (-9223372036854775807L -1)
1131// X86_64:INTPTR_MAX_ 9223372036854775807L
1132// X86_64:UINTPTR_MAX_ 18446744073709551615UL
1133// X86_64:PTRDIFF_MIN_ (-9223372036854775807L -1)
1134// X86_64:PTRDIFF_MAX_ 9223372036854775807L
1135// X86_64:SIZE_MAX_ 18446744073709551615UL
Chris Lattnerbceaf862009-10-29 04:55:36 +00001136//
1137// X86_64:INTMAX_MIN_ (-9223372036854775807L -1)
1138// X86_64:INTMAX_MAX_ 9223372036854775807L
Ken Dyckdb57ce52009-11-18 19:22:15 +00001139// X86_64:UINTMAX_MAX_ 18446744073709551615UL
Chris Lattnerbceaf862009-10-29 04:55:36 +00001140//
1141// X86_64:SIG_ATOMIC_MIN_ (-2147483647 -1)
1142// X86_64:SIG_ATOMIC_MAX_ 2147483647
1143// X86_64:WINT_MIN_ (-2147483647 -1)
1144// X86_64:WINT_MAX_ 2147483647
1145//
1146// X86_64:WCHAR_MAX_ 2147483647
1147// X86_64:WCHAR_MIN_ (-2147483647 -1)
1148//
Ken Dyck6ab25f42009-11-17 13:54:02 +00001149// X86_64:INT8_C_(0) 0
1150// X86_64:UINT8_C_(0) 0U
1151// X86_64:INT16_C_(0) 0
1152// X86_64:UINT16_C_(0) 0U
1153// X86_64:INT32_C_(0) 0
1154// X86_64:UINT32_C_(0) 0U
1155// X86_64:INT64_C_(0) 0L
1156// X86_64:UINT64_C_(0) 0UL
Chris Lattnerbceaf862009-10-29 04:55:36 +00001157//
Ken Dyck832b7102009-11-18 19:42:57 +00001158// X86_64:INTMAX_C_(0) 0L
1159// X86_64:UINTMAX_C_(0) 0UL
Chris Lattnerbceaf862009-10-29 04:55:36 +00001160//
Ken Dyckaface1b2009-11-20 16:37:35 +00001161//
1162// stdint.h forms several macro definitions by pasting together identifiers
1163// to form names (eg. int32_t is formed from int ## 32 ## _t). The following
1164// case tests that these joining operations are performed correctly even if
1165// the identifiers used in the operations (int, uint, _t, INT, UINT, _MIN,
1166// _MAX, and _C(v)) are themselves macros.
1167//
Daniel Dunbar96d38c12010-06-30 06:30:50 +00001168// RUN: %clang_cc1 -E -ffreestanding -U__UINTMAX_TYPE__ -U__INTMAX_TYPE__ -Dint=a -Duint=b -D_t=c -DINT=d -DUINT=e -D_MIN=f -D_MAX=g '-D_C(v)=h' -triple=i386-none-none %s | FileCheck -check-prefix JOIN %s
Ken Dyckaface1b2009-11-20 16:37:35 +00001169// JOIN:typedef int32_t intptr_t;
1170// JOIN:typedef uint32_t uintptr_t;
Daniel Dunbar96d38c12010-06-30 06:30:50 +00001171// JOIN:typedef __INTMAX_TYPE__ intmax_t;
1172// JOIN:typedef __UINTMAX_TYPE__ uintmax_t;
Ken Dycka2e92842009-11-20 16:44:38 +00001173// JOIN:INTPTR_MIN_ (-2147483647 -1)
1174// JOIN:INTPTR_MAX_ 2147483647
1175// JOIN:UINTPTR_MAX_ 4294967295U
1176// JOIN:PTRDIFF_MIN_ (-2147483647 -1)
1177// JOIN:PTRDIFF_MAX_ 2147483647
1178// JOIN:SIZE_MAX_ 4294967295U
1179// JOIN:INTMAX_MIN_ (-9223372036854775807LL -1)
1180// JOIN:INTMAX_MAX_ 9223372036854775807LL
1181// JOIN:UINTMAX_MAX_ 18446744073709551615ULL
1182// JOIN:SIG_ATOMIC_MIN_ (-2147483647 -1)
1183// JOIN:SIG_ATOMIC_MAX_ 2147483647
1184// JOIN:WINT_MIN_ (-2147483647 -1)
1185// JOIN:WINT_MAX_ 2147483647
1186// JOIN:WCHAR_MAX_ 2147483647
1187// JOIN:WCHAR_MIN_ (-2147483647 -1)
Ken Dyckfdb43242009-11-20 16:49:10 +00001188// JOIN:INTMAX_C_(0) 0LL
1189// JOIN:UINTMAX_C_(0) 0ULL
Chris Lattnerbceaf862009-10-29 04:55:36 +00001190
1191#include <stdint.h>
1192
1193INT8_MAX_ INT8_MAX
1194INT8_MIN_ INT8_MIN
1195UINT8_MAX_ UINT8_MAX
1196INT_LEAST8_MIN_ INT_LEAST8_MIN
1197INT_LEAST8_MAX_ INT_LEAST8_MAX
1198UINT_LEAST8_MAX_ UINT_LEAST8_MAX
1199INT_FAST8_MIN_ INT_FAST8_MIN
1200INT_FAST8_MAX_ INT_FAST8_MAX
1201UINT_FAST8_MAX_ UINT_FAST8_MAX
1202
1203INT16_MAX_ INT16_MAX
1204INT16_MIN_ INT16_MIN
1205UINT16_MAX_ UINT16_MAX
1206INT_LEAST16_MIN_ INT_LEAST16_MIN
1207INT_LEAST16_MAX_ INT_LEAST16_MAX
1208UINT_LEAST16_MAX_ UINT_LEAST16_MAX
1209INT_FAST16_MIN_ INT_FAST16_MIN
1210INT_FAST16_MAX_ INT_FAST16_MAX
1211UINT_FAST16_MAX_ UINT_FAST16_MAX
1212
1213INT32_MAX_ INT32_MAX
1214INT32_MIN_ INT32_MIN
1215UINT32_MAX_ UINT32_MAX
1216INT_LEAST32_MIN_ INT_LEAST32_MIN
1217INT_LEAST32_MAX_ INT_LEAST32_MAX
1218UINT_LEAST32_MAX_ UINT_LEAST32_MAX
1219INT_FAST32_MIN_ INT_FAST32_MIN
1220INT_FAST32_MAX_ INT_FAST32_MAX
1221UINT_FAST32_MAX_ UINT_FAST32_MAX
1222
1223INT64_MAX_ INT64_MAX
1224INT64_MIN_ INT64_MIN
1225UINT64_MAX_ UINT64_MAX
1226INT_LEAST64_MIN_ INT_LEAST64_MIN
1227INT_LEAST64_MAX_ INT_LEAST64_MAX
1228UINT_LEAST64_MAX_ UINT_LEAST64_MAX
1229INT_FAST64_MIN_ INT_FAST64_MIN
1230INT_FAST64_MAX_ INT_FAST64_MAX
1231UINT_FAST64_MAX_ UINT_FAST64_MAX
1232
1233INTPTR_MIN_ INTPTR_MIN
1234INTPTR_MAX_ INTPTR_MAX
1235UINTPTR_MAX_ UINTPTR_MAX
1236PTRDIFF_MIN_ PTRDIFF_MIN
1237PTRDIFF_MAX_ PTRDIFF_MAX
1238SIZE_MAX_ SIZE_MAX
1239
1240INTMAX_MIN_ INTMAX_MIN
1241INTMAX_MAX_ INTMAX_MAX
1242UINTMAX_MAX_ UINTMAX_MAX
1243
1244SIG_ATOMIC_MIN_ SIG_ATOMIC_MIN
1245SIG_ATOMIC_MAX_ SIG_ATOMIC_MAX
1246WINT_MIN_ WINT_MIN
1247WINT_MAX_ WINT_MAX
1248
1249WCHAR_MAX_ WCHAR_MAX
1250WCHAR_MIN_ WCHAR_MIN
1251
1252INT8_C_(0) INT8_C(0)
1253UINT8_C_(0) UINT8_C(0)
1254INT16_C_(0) INT16_C(0)
1255UINT16_C_(0) UINT16_C(0)
1256INT32_C_(0) INT32_C(0)
1257UINT32_C_(0) UINT32_C(0)
1258INT64_C_(0) INT64_C(0)
1259UINT64_C_(0) UINT64_C(0)
1260
1261INTMAX_C_(0) INTMAX_C(0)
1262UINTMAX_C_(0) UINTMAX_C(0)