blob: b3ae8438033c185eb1dbcd63cac02bfc4490eeed [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=powerpc64-none-none %s | FileCheck -check-prefix PPC64 %s
Chris Lattnerbceaf862009-10-29 04:55:36 +0000425//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000426// PPC64:typedef signed long int int64_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000427// PPC64:typedef unsigned long int uint64_t;
428// PPC64:typedef int64_t int_least64_t;
429// PPC64:typedef uint64_t uint_least64_t;
430// PPC64:typedef int64_t int_fast64_t;
431// PPC64:typedef uint64_t uint_fast64_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000432//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000433// PPC64:typedef signed int int32_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000434// PPC64:typedef unsigned int uint32_t;
435// PPC64:typedef int32_t int_least32_t;
436// PPC64:typedef uint32_t uint_least32_t;
437// PPC64:typedef int32_t int_fast32_t;
438// PPC64:typedef uint32_t uint_fast32_t;
439//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000440// PPC64:typedef signed short int16_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000441// PPC64:typedef unsigned short uint16_t;
442// PPC64:typedef int16_t int_least16_t;
443// PPC64:typedef uint16_t uint_least16_t;
444// PPC64:typedef int16_t int_fast16_t;
445// PPC64:typedef uint16_t uint_fast16_t;
446//
447// PPC64:typedef signed char int8_t;
448// PPC64:typedef unsigned char uint8_t;
449// PPC64:typedef int8_t int_least8_t;
450// PPC64:typedef uint8_t uint_least8_t;
451// PPC64:typedef int8_t int_fast8_t;
452// PPC64:typedef uint8_t uint_fast8_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000453//
Ken Dyck08321b42009-11-18 20:24:13 +0000454// PPC64:typedef int64_t intptr_t;
455// PPC64:typedef uint64_t uintptr_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000456//
Daniel Dunbar96d38c12010-06-30 06:30:50 +0000457// PPC64:typedef long int intmax_t;
458// PPC64:typedef long unsigned int uintmax_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000459//
460// PPC64:INT8_MAX_ 127
Ken Dyckb0887562009-11-17 18:29:12 +0000461// PPC64:INT8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000462// PPC64:UINT8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000463// PPC64:INT_LEAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000464// PPC64:INT_LEAST8_MAX_ 127
465// PPC64:UINT_LEAST8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000466// PPC64:INT_FAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000467// PPC64:INT_FAST8_MAX_ 127
468// PPC64:UINT_FAST8_MAX_ 255
469//
470// PPC64:INT16_MAX_ 32767
Ken Dyckb0887562009-11-17 18:29:12 +0000471// PPC64:INT16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000472// PPC64:UINT16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000473// PPC64:INT_LEAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000474// PPC64:INT_LEAST16_MAX_ 32767
475// PPC64:UINT_LEAST16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000476// PPC64:INT_FAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000477// PPC64:INT_FAST16_MAX_ 32767
478// PPC64:UINT_FAST16_MAX_ 65535
479//
480// PPC64:INT32_MAX_ 2147483647
481// PPC64:INT32_MIN_ (-2147483647 -1)
482// PPC64:UINT32_MAX_ 4294967295U
483// PPC64:INT_LEAST32_MIN_ (-2147483647 -1)
484// PPC64:INT_LEAST32_MAX_ 2147483647
485// PPC64:UINT_LEAST32_MAX_ 4294967295U
486// PPC64:INT_FAST32_MIN_ (-2147483647 -1)
487// PPC64:INT_FAST32_MAX_ 2147483647
488// PPC64:UINT_FAST32_MAX_ 4294967295U
489//
Ken Dyck81638412009-11-17 16:26:27 +0000490// PPC64:INT64_MAX_ 9223372036854775807L
491// PPC64:INT64_MIN_ (-9223372036854775807L -1)
492// PPC64:UINT64_MAX_ 18446744073709551615UL
493// PPC64:INT_LEAST64_MIN_ (-9223372036854775807L -1)
494// PPC64:INT_LEAST64_MAX_ 9223372036854775807L
495// PPC64:UINT_LEAST64_MAX_ 18446744073709551615UL
496// PPC64:INT_FAST64_MIN_ (-9223372036854775807L -1)
497// PPC64:INT_FAST64_MAX_ 9223372036854775807L
498// PPC64:UINT_FAST64_MAX_ 18446744073709551615UL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000499//
Ken Dyck81638412009-11-17 16:26:27 +0000500// PPC64:INTPTR_MIN_ (-9223372036854775807L -1)
501// PPC64:INTPTR_MAX_ 9223372036854775807L
502// PPC64:UINTPTR_MAX_ 18446744073709551615UL
503// PPC64:PTRDIFF_MIN_ (-9223372036854775807L -1)
504// PPC64:PTRDIFF_MAX_ 9223372036854775807L
505// PPC64:SIZE_MAX_ 18446744073709551615UL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000506//
507// PPC64:INTMAX_MIN_ (-9223372036854775807L -1)
508// PPC64:INTMAX_MAX_ 9223372036854775807L
Ken Dyckdb57ce52009-11-18 19:22:15 +0000509// PPC64:UINTMAX_MAX_ 18446744073709551615UL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000510//
511// PPC64:SIG_ATOMIC_MIN_ (-2147483647 -1)
512// PPC64:SIG_ATOMIC_MAX_ 2147483647
513// PPC64:WINT_MIN_ (-2147483647 -1)
514// PPC64:WINT_MAX_ 2147483647
515//
516// PPC64:WCHAR_MAX_ 2147483647
517// PPC64:WCHAR_MIN_ (-2147483647 -1)
518//
Ken Dyck6ab25f42009-11-17 13:54:02 +0000519// PPC64:INT8_C_(0) 0
520// PPC64:UINT8_C_(0) 0U
521// PPC64:INT16_C_(0) 0
522// PPC64:UINT16_C_(0) 0U
523// PPC64:INT32_C_(0) 0
524// PPC64:UINT32_C_(0) 0U
525// PPC64:INT64_C_(0) 0L
526// PPC64:UINT64_C_(0) 0UL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000527//
Ken Dyck832b7102009-11-18 19:42:57 +0000528// PPC64:INTMAX_C_(0) 0L
529// PPC64:UINTMAX_C_(0) 0UL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000530//
Daniel Dunbara5728872009-12-15 20:14:24 +0000531// RUN: %clang_cc1 -E -ffreestanding -triple=powerpc-none-none %s | FileCheck -check-prefix PPC %s
Chris Lattnerbceaf862009-10-29 04:55:36 +0000532//
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000533//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000534// PPC:typedef signed long long int int64_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000535// PPC:typedef unsigned long long int uint64_t;
536// PPC:typedef int64_t int_least64_t;
537// PPC:typedef uint64_t uint_least64_t;
538// PPC:typedef int64_t int_fast64_t;
539// PPC:typedef uint64_t uint_fast64_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000540//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000541// PPC:typedef signed int int32_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000542// PPC:typedef unsigned int uint32_t;
543// PPC:typedef int32_t int_least32_t;
544// PPC:typedef uint32_t uint_least32_t;
545// PPC:typedef int32_t int_fast32_t;
546// PPC:typedef uint32_t uint_fast32_t;
547//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000548// PPC:typedef signed short int16_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000549// PPC:typedef unsigned short uint16_t;
550// PPC:typedef int16_t int_least16_t;
551// PPC:typedef uint16_t uint_least16_t;
552// PPC:typedef int16_t int_fast16_t;
553// PPC:typedef uint16_t uint_fast16_t;
554//
555// PPC:typedef signed char int8_t;
556// PPC:typedef unsigned char uint8_t;
557// PPC:typedef int8_t int_least8_t;
558// PPC:typedef uint8_t uint_least8_t;
559// PPC:typedef int8_t int_fast8_t;
560// PPC:typedef uint8_t uint_fast8_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000561//
Ken Dyck08321b42009-11-18 20:24:13 +0000562// PPC:typedef int32_t intptr_t;
563// PPC:typedef uint32_t uintptr_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000564//
Daniel Dunbar96d38c12010-06-30 06:30:50 +0000565// PPC:typedef long long int intmax_t;
566// PPC:typedef long long unsigned int uintmax_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000567//
568// PPC:INT8_MAX_ 127
Ken Dyckb0887562009-11-17 18:29:12 +0000569// PPC:INT8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000570// PPC:UINT8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000571// PPC:INT_LEAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000572// PPC:INT_LEAST8_MAX_ 127
573// PPC:UINT_LEAST8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000574// PPC:INT_FAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000575// PPC:INT_FAST8_MAX_ 127
576// PPC:UINT_FAST8_MAX_ 255
577//
578// PPC:INT16_MAX_ 32767
Ken Dyckb0887562009-11-17 18:29:12 +0000579// PPC:INT16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000580// PPC:UINT16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000581// PPC:INT_LEAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000582// PPC:INT_LEAST16_MAX_ 32767
583// PPC:UINT_LEAST16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000584// PPC:INT_FAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000585// PPC:INT_FAST16_MAX_ 32767
586// PPC:UINT_FAST16_MAX_ 65535
587//
588// PPC:INT32_MAX_ 2147483647
589// PPC:INT32_MIN_ (-2147483647 -1)
590// PPC:UINT32_MAX_ 4294967295U
591// PPC:INT_LEAST32_MIN_ (-2147483647 -1)
592// PPC:INT_LEAST32_MAX_ 2147483647
593// PPC:UINT_LEAST32_MAX_ 4294967295U
594// PPC:INT_FAST32_MIN_ (-2147483647 -1)
595// PPC:INT_FAST32_MAX_ 2147483647
596// PPC:UINT_FAST32_MAX_ 4294967295U
597//
598// PPC:INT64_MAX_ 9223372036854775807LL
599// PPC:INT64_MIN_ (-9223372036854775807LL -1)
600// PPC:UINT64_MAX_ 18446744073709551615ULL
601// PPC:INT_LEAST64_MIN_ (-9223372036854775807LL -1)
602// PPC:INT_LEAST64_MAX_ 9223372036854775807LL
603// PPC:UINT_LEAST64_MAX_ 18446744073709551615ULL
604// PPC:INT_FAST64_MIN_ (-9223372036854775807LL -1)
605// PPC:INT_FAST64_MAX_ 9223372036854775807LL
606// PPC:UINT_FAST64_MAX_ 18446744073709551615ULL
607//
608// PPC:INTPTR_MIN_ (-2147483647 -1)
609// PPC:INTPTR_MAX_ 2147483647
610// PPC:UINTPTR_MAX_ 4294967295U
611// PPC:PTRDIFF_MIN_ (-2147483647 -1)
612// PPC:PTRDIFF_MAX_ 2147483647
613// PPC:SIZE_MAX_ 4294967295U
614//
615// PPC:INTMAX_MIN_ (-9223372036854775807LL -1)
616// PPC:INTMAX_MAX_ 9223372036854775807LL
Ken Dyckdb57ce52009-11-18 19:22:15 +0000617// PPC:UINTMAX_MAX_ 18446744073709551615ULL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000618//
619// PPC:SIG_ATOMIC_MIN_ (-2147483647 -1)
620// PPC:SIG_ATOMIC_MAX_ 2147483647
621// PPC:WINT_MIN_ (-2147483647 -1)
622// PPC:WINT_MAX_ 2147483647
623//
624// PPC:WCHAR_MAX_ 2147483647
625// PPC:WCHAR_MIN_ (-2147483647 -1)
626//
Ken Dyck6ab25f42009-11-17 13:54:02 +0000627// PPC:INT8_C_(0) 0
628// PPC:UINT8_C_(0) 0U
629// PPC:INT16_C_(0) 0
630// PPC:UINT16_C_(0) 0U
631// PPC:INT32_C_(0) 0
632// PPC:UINT32_C_(0) 0U
633// PPC:INT64_C_(0) 0LL
634// PPC:UINT64_C_(0) 0ULL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000635//
Ken Dyck6ab25f42009-11-17 13:54:02 +0000636// PPC:INTMAX_C_(0) 0LL
637// PPC:UINTMAX_C_(0) 0ULL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000638//
Daniel Dunbara5728872009-12-15 20:14:24 +0000639// RUN: %clang_cc1 -E -ffreestanding -triple=s390x-none-none %s | FileCheck -check-prefix S390X %s
Chris Lattnerbceaf862009-10-29 04:55:36 +0000640//
Daniel Dunbar7f3a5452010-06-30 06:30:56 +0000641// S390X:typedef signed long long int int64_t;
642// S390X:typedef unsigned long long int uint64_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000643// S390X:typedef int64_t int_least64_t;
644// S390X:typedef uint64_t uint_least64_t;
645// S390X:typedef int64_t int_fast64_t;
646// S390X:typedef uint64_t uint_fast64_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000647//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000648// S390X:typedef signed int int32_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000649// S390X:typedef unsigned int uint32_t;
650// S390X:typedef int32_t int_least32_t;
651// S390X:typedef uint32_t uint_least32_t;
652// S390X:typedef int32_t int_fast32_t;
653// S390X:typedef uint32_t uint_fast32_t;
654//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000655// S390X:typedef signed short int16_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000656// S390X:typedef unsigned short uint16_t;
657// S390X:typedef int16_t int_least16_t;
658// S390X:typedef uint16_t uint_least16_t;
659// S390X:typedef int16_t int_fast16_t;
660// S390X:typedef uint16_t uint_fast16_t;
661//
662// S390X:typedef signed char int8_t;
663// S390X:typedef unsigned char uint8_t;
664// S390X:typedef int8_t int_least8_t;
665// S390X:typedef uint8_t uint_least8_t;
666// S390X:typedef int8_t int_fast8_t;
667// S390X:typedef uint8_t uint_fast8_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000668//
Ken Dyck08321b42009-11-18 20:24:13 +0000669// S390X:typedef int64_t intptr_t;
670// S390X:typedef uint64_t uintptr_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000671//
Daniel Dunbar96d38c12010-06-30 06:30:50 +0000672// S390X:typedef long long int intmax_t;
673// S390X:typedef long long unsigned int uintmax_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000674//
675// S390X:INT8_MAX_ 127
Ken Dyckb0887562009-11-17 18:29:12 +0000676// S390X:INT8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000677// S390X:UINT8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000678// S390X:INT_LEAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000679// S390X:INT_LEAST8_MAX_ 127
680// S390X:UINT_LEAST8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000681// S390X:INT_FAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000682// S390X:INT_FAST8_MAX_ 127
683// S390X:UINT_FAST8_MAX_ 255
684//
685// S390X:INT16_MAX_ 32767
Ken Dyckb0887562009-11-17 18:29:12 +0000686// S390X:INT16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000687// S390X:UINT16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000688// S390X:INT_LEAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000689// S390X:INT_LEAST16_MAX_ 32767
690// S390X:UINT_LEAST16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000691// S390X:INT_FAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000692// S390X:INT_FAST16_MAX_ 32767
693// S390X:UINT_FAST16_MAX_ 65535
694//
695// S390X:INT32_MAX_ 2147483647
696// S390X:INT32_MIN_ (-2147483647 -1)
697// S390X:UINT32_MAX_ 4294967295U
698// S390X:INT_LEAST32_MIN_ (-2147483647 -1)
699// S390X:INT_LEAST32_MAX_ 2147483647
700// S390X:UINT_LEAST32_MAX_ 4294967295U
701// S390X:INT_FAST32_MIN_ (-2147483647 -1)
702// S390X:INT_FAST32_MAX_ 2147483647
703// S390X:UINT_FAST32_MAX_ 4294967295U
704//
Ken Dyck81638412009-11-17 16:26:27 +0000705// S390X:INT64_MAX_ 9223372036854775807L
Daniel Dunbar7f3a5452010-06-30 06:30:56 +0000706// S390X:INT64_MIN_ (-9223372036854775807LL -1)
Ken Dyck81638412009-11-17 16:26:27 +0000707// S390X:UINT64_MAX_ 18446744073709551615UL
Daniel Dunbar7f3a5452010-06-30 06:30:56 +0000708// S390X:INT_LEAST64_MIN_ (-9223372036854775807LL -1)
Ken Dyck81638412009-11-17 16:26:27 +0000709// S390X:INT_LEAST64_MAX_ 9223372036854775807L
710// S390X:UINT_LEAST64_MAX_ 18446744073709551615UL
Daniel Dunbar7f3a5452010-06-30 06:30:56 +0000711// S390X:INT_FAST64_MIN_ (-9223372036854775807LL -1)
Ken Dyck81638412009-11-17 16:26:27 +0000712// S390X:INT_FAST64_MAX_ 9223372036854775807L
713// S390X:UINT_FAST64_MAX_ 18446744073709551615UL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000714//
Daniel Dunbar7f3a5452010-06-30 06:30:56 +0000715// S390X:INTPTR_MIN_ (-9223372036854775807LL -1)
Ken Dyck81638412009-11-17 16:26:27 +0000716// S390X:INTPTR_MAX_ 9223372036854775807L
717// S390X:UINTPTR_MAX_ 18446744073709551615UL
Daniel Dunbar7f3a5452010-06-30 06:30:56 +0000718// S390X:PTRDIFF_MIN_ (-9223372036854775807LL -1)
Ken Dyck81638412009-11-17 16:26:27 +0000719// S390X:PTRDIFF_MAX_ 9223372036854775807L
720// S390X:SIZE_MAX_ 18446744073709551615UL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000721//
Daniel Dunbar7f3a5452010-06-30 06:30:56 +0000722// S390X:INTMAX_MIN_ (-9223372036854775807LL -1)
Ken Dyckdb57ce52009-11-18 19:22:15 +0000723// S390X:INTMAX_MAX_ 9223372036854775807L
724// S390X:UINTMAX_MAX_ 18446744073709551615UL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000725//
726// S390X:SIG_ATOMIC_MIN_ (-2147483647 -1)
727// S390X:SIG_ATOMIC_MAX_ 2147483647
728// S390X:WINT_MIN_ (-2147483647 -1)
729// S390X:WINT_MAX_ 2147483647
730//
731// S390X:WCHAR_MAX_ 2147483647
732// S390X:WCHAR_MIN_ (-2147483647 -1)
733//
Ken Dyck6ab25f42009-11-17 13:54:02 +0000734// S390X:INT8_C_(0) 0
735// S390X:UINT8_C_(0) 0U
736// S390X:INT16_C_(0) 0
737// S390X:UINT16_C_(0) 0U
738// S390X:INT32_C_(0) 0
739// S390X:UINT32_C_(0) 0U
740// S390X:INT64_C_(0) 0L
741// S390X:UINT64_C_(0) 0UL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000742//
Ken Dyck832b7102009-11-18 19:42:57 +0000743// S390X:INTMAX_C_(0) 0L
744// S390X:UINTMAX_C_(0) 0UL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000745//
Daniel Dunbara5728872009-12-15 20:14:24 +0000746// RUN: %clang_cc1 -E -ffreestanding -triple=sparc-none-none %s | FileCheck -check-prefix SPARC %s
Chris Lattnerbceaf862009-10-29 04:55:36 +0000747//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000748// SPARC:typedef signed long long int int64_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000749// SPARC:typedef unsigned long long int uint64_t;
750// SPARC:typedef int64_t int_least64_t;
751// SPARC:typedef uint64_t uint_least64_t;
752// SPARC:typedef int64_t int_fast64_t;
753// SPARC:typedef uint64_t uint_fast64_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000754//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000755// SPARC:typedef signed int int32_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000756// SPARC:typedef unsigned int uint32_t;
757// SPARC:typedef int32_t int_least32_t;
758// SPARC:typedef uint32_t uint_least32_t;
759// SPARC:typedef int32_t int_fast32_t;
760// SPARC:typedef uint32_t uint_fast32_t;
761//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000762// SPARC:typedef signed short int16_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000763// SPARC:typedef unsigned short uint16_t;
764// SPARC:typedef int16_t int_least16_t;
765// SPARC:typedef uint16_t uint_least16_t;
766// SPARC:typedef int16_t int_fast16_t;
767// SPARC:typedef uint16_t uint_fast16_t;
768//
769// SPARC:typedef signed char int8_t;
770// SPARC:typedef unsigned char uint8_t;
771// SPARC:typedef int8_t int_least8_t;
772// SPARC:typedef uint8_t uint_least8_t;
773// SPARC:typedef int8_t int_fast8_t;
774// SPARC:typedef uint8_t uint_fast8_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000775//
Ken Dyck08321b42009-11-18 20:24:13 +0000776// SPARC:typedef int32_t intptr_t;
777// SPARC:typedef uint32_t uintptr_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000778//
Daniel Dunbar96d38c12010-06-30 06:30:50 +0000779// SPARC:typedef long long int intmax_t;
780// SPARC:typedef long long unsigned int uintmax_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000781//
782// SPARC:INT8_MAX_ 127
Ken Dyckb0887562009-11-17 18:29:12 +0000783// SPARC:INT8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000784// SPARC:UINT8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000785// SPARC:INT_LEAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000786// SPARC:INT_LEAST8_MAX_ 127
787// SPARC:UINT_LEAST8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000788// SPARC:INT_FAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000789// SPARC:INT_FAST8_MAX_ 127
790// SPARC:UINT_FAST8_MAX_ 255
791//
792// SPARC:INT16_MAX_ 32767
Ken Dyckb0887562009-11-17 18:29:12 +0000793// SPARC:INT16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000794// SPARC:UINT16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000795// SPARC:INT_LEAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000796// SPARC:INT_LEAST16_MAX_ 32767
797// SPARC:UINT_LEAST16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000798// SPARC:INT_FAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000799// SPARC:INT_FAST16_MAX_ 32767
800// SPARC:UINT_FAST16_MAX_ 65535
801//
802// SPARC:INT32_MAX_ 2147483647
803// SPARC:INT32_MIN_ (-2147483647 -1)
804// SPARC:UINT32_MAX_ 4294967295U
805// SPARC:INT_LEAST32_MIN_ (-2147483647 -1)
806// SPARC:INT_LEAST32_MAX_ 2147483647
807// SPARC:UINT_LEAST32_MAX_ 4294967295U
808// SPARC:INT_FAST32_MIN_ (-2147483647 -1)
809// SPARC:INT_FAST32_MAX_ 2147483647
810// SPARC:UINT_FAST32_MAX_ 4294967295U
811//
812// SPARC:INT64_MAX_ 9223372036854775807LL
813// SPARC:INT64_MIN_ (-9223372036854775807LL -1)
814// SPARC:UINT64_MAX_ 18446744073709551615ULL
815// SPARC:INT_LEAST64_MIN_ (-9223372036854775807LL -1)
816// SPARC:INT_LEAST64_MAX_ 9223372036854775807LL
817// SPARC:UINT_LEAST64_MAX_ 18446744073709551615ULL
818// SPARC:INT_FAST64_MIN_ (-9223372036854775807LL -1)
819// SPARC:INT_FAST64_MAX_ 9223372036854775807LL
820// SPARC:UINT_FAST64_MAX_ 18446744073709551615ULL
821//
822// SPARC:INTPTR_MIN_ (-2147483647 -1)
823// SPARC:INTPTR_MAX_ 2147483647
824// SPARC:UINTPTR_MAX_ 4294967295U
825// SPARC:PTRDIFF_MIN_ (-2147483647 -1)
826// SPARC:PTRDIFF_MAX_ 2147483647
827// SPARC:SIZE_MAX_ 4294967295U
828//
829// SPARC:INTMAX_MIN_ (-9223372036854775807LL -1)
830// SPARC:INTMAX_MAX_ 9223372036854775807LL
Ken Dyckdb57ce52009-11-18 19:22:15 +0000831// SPARC:UINTMAX_MAX_ 18446744073709551615ULL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000832//
833// SPARC:SIG_ATOMIC_MIN_ (-2147483647 -1)
834// SPARC:SIG_ATOMIC_MAX_ 2147483647
835// SPARC:WINT_MIN_ (-2147483647 -1)
836// SPARC:WINT_MAX_ 2147483647
837//
838// SPARC:WCHAR_MAX_ 2147483647
839// SPARC:WCHAR_MIN_ (-2147483647 -1)
840//
Ken Dyck6ab25f42009-11-17 13:54:02 +0000841// SPARC:INT8_C_(0) 0
842// SPARC:UINT8_C_(0) 0U
843// SPARC:INT16_C_(0) 0
844// SPARC:UINT16_C_(0) 0U
845// SPARC:INT32_C_(0) 0
846// SPARC:UINT32_C_(0) 0U
847// SPARC:INT64_C_(0) 0LL
848// SPARC:UINT64_C_(0) 0ULL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000849//
Ken Dyck6ab25f42009-11-17 13:54:02 +0000850// SPARC:INTMAX_C_(0) 0LL
851// SPARC:UINTMAX_C_(0) 0ULL
Chris Lattnerbceaf862009-10-29 04:55:36 +0000852//
Daniel Dunbara5728872009-12-15 20:14:24 +0000853// RUN: %clang_cc1 -E -ffreestanding -triple=tce-none-none %s | FileCheck -check-prefix TCE %s
Chris Lattnerbceaf862009-10-29 04:55:36 +0000854//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000855// TCE:typedef signed int int32_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000856// TCE:typedef unsigned int uint32_t;
857// TCE:typedef int32_t int_least32_t;
858// TCE:typedef uint32_t uint_least32_t;
859// TCE:typedef int32_t int_fast32_t;
860// TCE:typedef uint32_t uint_fast32_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000861//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000862// TCE:typedef signed short int16_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000863// TCE:typedef unsigned short uint16_t;
864// TCE:typedef int16_t int_least16_t;
865// TCE:typedef uint16_t uint_least16_t;
866// TCE:typedef int16_t int_fast16_t;
867// TCE:typedef uint16_t uint_fast16_t;
868//
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000869// TCE:typedef signed char int8_t;
870// TCE:typedef unsigned char uint8_t;
871// TCE:typedef int8_t int_least8_t;
872// TCE:typedef uint8_t uint_least8_t;
873// TCE:typedef int8_t int_fast8_t;
874// TCE:typedef uint8_t uint_fast8_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000875//
Ken Dyck08321b42009-11-18 20:24:13 +0000876// TCE:typedef int32_t intptr_t;
877// TCE:typedef uint32_t uintptr_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000878//
Daniel Dunbar96d38c12010-06-30 06:30:50 +0000879// TCE:typedef long int intmax_t;
880// TCE:typedef long unsigned int uintmax_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000881//
882// TCE:INT8_MAX_ 127
Ken Dyckb0887562009-11-17 18:29:12 +0000883// TCE:INT8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000884// TCE:UINT8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000885// TCE:INT_LEAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000886// TCE:INT_LEAST8_MAX_ 127
887// TCE:UINT_LEAST8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000888// TCE:INT_FAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000889// TCE:INT_FAST8_MAX_ 127
890// TCE:UINT_FAST8_MAX_ 255
891//
892// TCE:INT16_MAX_ 32767
Ken Dyckb0887562009-11-17 18:29:12 +0000893// TCE:INT16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000894// TCE:UINT16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000895// TCE:INT_LEAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000896// TCE:INT_LEAST16_MAX_ 32767
897// TCE:UINT_LEAST16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +0000898// TCE:INT_FAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000899// TCE:INT_FAST16_MAX_ 32767
900// TCE:UINT_FAST16_MAX_ 65535
901//
902// TCE:INT32_MAX_ 2147483647
903// TCE:INT32_MIN_ (-2147483647 -1)
904// TCE:UINT32_MAX_ 4294967295U
905// TCE:INT_LEAST32_MIN_ (-2147483647 -1)
906// TCE:INT_LEAST32_MAX_ 2147483647
907// TCE:UINT_LEAST32_MAX_ 4294967295U
908// TCE:INT_FAST32_MIN_ (-2147483647 -1)
909// TCE:INT_FAST32_MAX_ 2147483647
910// TCE:UINT_FAST32_MAX_ 4294967295U
911//
912// TCE:INT64_MAX_ INT64_MAX
913// TCE:INT64_MIN_ INT64_MIN
914// TCE:UINT64_MAX_ UINT64_MAX
915// TCE:INT_LEAST64_MIN_ INT_LEAST64_MIN
916// TCE:INT_LEAST64_MAX_ INT_LEAST64_MAX
917// TCE:UINT_LEAST64_MAX_ UINT_LEAST64_MAX
918// TCE:INT_FAST64_MIN_ INT_FAST64_MIN
919// TCE:INT_FAST64_MAX_ INT_FAST64_MAX
920// TCE:UINT_FAST64_MAX_ UINT_FAST64_MAX
921//
922// TCE:INTPTR_MIN_ (-2147483647 -1)
923// TCE:INTPTR_MAX_ 2147483647
924// TCE:UINTPTR_MAX_ 4294967295U
925// TCE:PTRDIFF_MIN_ (-2147483647 -1)
926// TCE:PTRDIFF_MAX_ 2147483647
927// TCE:SIZE_MAX_ 4294967295U
928//
Ken Dyckdb57ce52009-11-18 19:22:15 +0000929// TCE:INTMAX_MIN_ (-2147483647 -1)
930// TCE:INTMAX_MAX_ 2147483647
931// TCE:UINTMAX_MAX_ 4294967295U
Chris Lattnerbceaf862009-10-29 04:55:36 +0000932//
933// TCE:SIG_ATOMIC_MIN_ (-2147483647 -1)
934// TCE:SIG_ATOMIC_MAX_ 2147483647
935// TCE:WINT_MIN_ (-2147483647 -1)
936// TCE:WINT_MAX_ 2147483647
937//
938// TCE:WCHAR_MAX_ 2147483647
939// TCE:WCHAR_MIN_ (-2147483647 -1)
940//
Ken Dyck6ab25f42009-11-17 13:54:02 +0000941// TCE:INT8_C_(0) 0
942// TCE:UINT8_C_(0) 0U
943// TCE:INT16_C_(0) 0
944// TCE:UINT16_C_(0) 0U
945// TCE:INT32_C_(0) 0
946// TCE:UINT32_C_(0) 0U
Chris Lattnerbceaf862009-10-29 04:55:36 +0000947// TCE:INT64_C_(0) INT64_C(0)
948// TCE:UINT64_C_(0) UINT64_C(0)
949//
Ken Dyck832b7102009-11-18 19:42:57 +0000950// TCE:INTMAX_C_(0) 0
951// TCE:UINTMAX_C_(0) 0U
Chris Lattnerbceaf862009-10-29 04:55:36 +0000952//
Daniel Dunbara5728872009-12-15 20:14:24 +0000953// RUN: %clang_cc1 -E -ffreestanding -triple=x86_64-none-none %s | FileCheck -check-prefix X86_64 %s
Chris Lattnerbceaf862009-10-29 04:55:36 +0000954//
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000955//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000956// X86_64:typedef signed long int int64_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000957// X86_64:typedef unsigned long int uint64_t;
958// X86_64:typedef int64_t int_least64_t;
959// X86_64:typedef uint64_t uint_least64_t;
960// X86_64:typedef int64_t int_fast64_t;
961// X86_64:typedef uint64_t uint_fast64_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000962//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000963// X86_64:typedef signed int int32_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000964// X86_64:typedef unsigned int uint32_t;
965// X86_64:typedef int32_t int_least32_t;
966// X86_64:typedef uint32_t uint_least32_t;
967// X86_64:typedef int32_t int_fast32_t;
968// X86_64:typedef uint32_t uint_fast32_t;
969//
Chris Lattnerdcdd2a02009-11-12 08:08:27 +0000970// X86_64:typedef signed short int16_t;
Chris Lattner06dcf6b2009-11-04 23:03:18 +0000971// X86_64:typedef unsigned short uint16_t;
972// X86_64:typedef int16_t int_least16_t;
973// X86_64:typedef uint16_t uint_least16_t;
974// X86_64:typedef int16_t int_fast16_t;
975// X86_64:typedef uint16_t uint_fast16_t;
976//
977// X86_64:typedef signed char int8_t;
978// X86_64:typedef unsigned char uint8_t;
979// X86_64:typedef int8_t int_least8_t;
980// X86_64:typedef uint8_t uint_least8_t;
981// X86_64:typedef int8_t int_fast8_t;
982// X86_64:typedef uint8_t uint_fast8_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000983//
Ken Dyck08321b42009-11-18 20:24:13 +0000984// X86_64:typedef int64_t intptr_t;
985// X86_64:typedef uint64_t uintptr_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000986//
Daniel Dunbar96d38c12010-06-30 06:30:50 +0000987// X86_64:typedef long int intmax_t;
988// X86_64:typedef long unsigned int uintmax_t;
Chris Lattnerbceaf862009-10-29 04:55:36 +0000989//
990// X86_64:INT8_MAX_ 127
Ken Dyckb0887562009-11-17 18:29:12 +0000991// X86_64:INT8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000992// X86_64:UINT8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000993// X86_64:INT_LEAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000994// X86_64:INT_LEAST8_MAX_ 127
995// X86_64:UINT_LEAST8_MAX_ 255
Ken Dyckb0887562009-11-17 18:29:12 +0000996// X86_64:INT_FAST8_MIN_ (-127 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +0000997// X86_64:INT_FAST8_MAX_ 127
998// X86_64:UINT_FAST8_MAX_ 255
999//
1000// X86_64:INT16_MAX_ 32767
Ken Dyckb0887562009-11-17 18:29:12 +00001001// X86_64:INT16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +00001002// X86_64:UINT16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +00001003// X86_64:INT_LEAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +00001004// X86_64:INT_LEAST16_MAX_ 32767
1005// X86_64:UINT_LEAST16_MAX_ 65535
Ken Dyckb0887562009-11-17 18:29:12 +00001006// X86_64:INT_FAST16_MIN_ (-32767 -1)
Chris Lattnerbceaf862009-10-29 04:55:36 +00001007// X86_64:INT_FAST16_MAX_ 32767
1008// X86_64:UINT_FAST16_MAX_ 65535
1009//
1010// X86_64:INT32_MAX_ 2147483647
1011// X86_64:INT32_MIN_ (-2147483647 -1)
1012// X86_64:UINT32_MAX_ 4294967295U
1013// X86_64:INT_LEAST32_MIN_ (-2147483647 -1)
1014// X86_64:INT_LEAST32_MAX_ 2147483647
1015// X86_64:UINT_LEAST32_MAX_ 4294967295U
1016// X86_64:INT_FAST32_MIN_ (-2147483647 -1)
1017// X86_64:INT_FAST32_MAX_ 2147483647
1018// X86_64:UINT_FAST32_MAX_ 4294967295U
1019//
Ken Dyck81638412009-11-17 16:26:27 +00001020// X86_64:INT64_MAX_ 9223372036854775807L
1021// X86_64:INT64_MIN_ (-9223372036854775807L -1)
1022// X86_64:UINT64_MAX_ 18446744073709551615UL
1023// X86_64:INT_LEAST64_MIN_ (-9223372036854775807L -1)
1024// X86_64:INT_LEAST64_MAX_ 9223372036854775807L
1025// X86_64:UINT_LEAST64_MAX_ 18446744073709551615UL
1026// X86_64:INT_FAST64_MIN_ (-9223372036854775807L -1)
1027// X86_64:INT_FAST64_MAX_ 9223372036854775807L
1028// X86_64:UINT_FAST64_MAX_ 18446744073709551615UL
Chris Lattnerbceaf862009-10-29 04:55:36 +00001029//
Ken Dyck81638412009-11-17 16:26:27 +00001030// X86_64:INTPTR_MIN_ (-9223372036854775807L -1)
1031// X86_64:INTPTR_MAX_ 9223372036854775807L
1032// X86_64:UINTPTR_MAX_ 18446744073709551615UL
1033// X86_64:PTRDIFF_MIN_ (-9223372036854775807L -1)
1034// X86_64:PTRDIFF_MAX_ 9223372036854775807L
1035// X86_64:SIZE_MAX_ 18446744073709551615UL
Chris Lattnerbceaf862009-10-29 04:55:36 +00001036//
1037// X86_64:INTMAX_MIN_ (-9223372036854775807L -1)
1038// X86_64:INTMAX_MAX_ 9223372036854775807L
Ken Dyckdb57ce52009-11-18 19:22:15 +00001039// X86_64:UINTMAX_MAX_ 18446744073709551615UL
Chris Lattnerbceaf862009-10-29 04:55:36 +00001040//
1041// X86_64:SIG_ATOMIC_MIN_ (-2147483647 -1)
1042// X86_64:SIG_ATOMIC_MAX_ 2147483647
1043// X86_64:WINT_MIN_ (-2147483647 -1)
1044// X86_64:WINT_MAX_ 2147483647
1045//
1046// X86_64:WCHAR_MAX_ 2147483647
1047// X86_64:WCHAR_MIN_ (-2147483647 -1)
1048//
Ken Dyck6ab25f42009-11-17 13:54:02 +00001049// X86_64:INT8_C_(0) 0
1050// X86_64:UINT8_C_(0) 0U
1051// X86_64:INT16_C_(0) 0
1052// X86_64:UINT16_C_(0) 0U
1053// X86_64:INT32_C_(0) 0
1054// X86_64:UINT32_C_(0) 0U
1055// X86_64:INT64_C_(0) 0L
1056// X86_64:UINT64_C_(0) 0UL
Chris Lattnerbceaf862009-10-29 04:55:36 +00001057//
Ken Dyck832b7102009-11-18 19:42:57 +00001058// X86_64:INTMAX_C_(0) 0L
1059// X86_64:UINTMAX_C_(0) 0UL
Chris Lattnerbceaf862009-10-29 04:55:36 +00001060//
Ken Dyckaface1b2009-11-20 16:37:35 +00001061//
1062// stdint.h forms several macro definitions by pasting together identifiers
1063// to form names (eg. int32_t is formed from int ## 32 ## _t). The following
1064// case tests that these joining operations are performed correctly even if
1065// the identifiers used in the operations (int, uint, _t, INT, UINT, _MIN,
1066// _MAX, and _C(v)) are themselves macros.
1067//
Daniel Dunbar96d38c12010-06-30 06:30:50 +00001068// 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 +00001069// JOIN:typedef int32_t intptr_t;
1070// JOIN:typedef uint32_t uintptr_t;
Daniel Dunbar96d38c12010-06-30 06:30:50 +00001071// JOIN:typedef __INTMAX_TYPE__ intmax_t;
1072// JOIN:typedef __UINTMAX_TYPE__ uintmax_t;
Ken Dycka2e92842009-11-20 16:44:38 +00001073// JOIN:INTPTR_MIN_ (-2147483647 -1)
1074// JOIN:INTPTR_MAX_ 2147483647
1075// JOIN:UINTPTR_MAX_ 4294967295U
1076// JOIN:PTRDIFF_MIN_ (-2147483647 -1)
1077// JOIN:PTRDIFF_MAX_ 2147483647
1078// JOIN:SIZE_MAX_ 4294967295U
1079// JOIN:INTMAX_MIN_ (-9223372036854775807LL -1)
1080// JOIN:INTMAX_MAX_ 9223372036854775807LL
1081// JOIN:UINTMAX_MAX_ 18446744073709551615ULL
1082// JOIN:SIG_ATOMIC_MIN_ (-2147483647 -1)
1083// JOIN:SIG_ATOMIC_MAX_ 2147483647
1084// JOIN:WINT_MIN_ (-2147483647 -1)
1085// JOIN:WINT_MAX_ 2147483647
1086// JOIN:WCHAR_MAX_ 2147483647
1087// JOIN:WCHAR_MIN_ (-2147483647 -1)
Ken Dyckfdb43242009-11-20 16:49:10 +00001088// JOIN:INTMAX_C_(0) 0LL
1089// JOIN:UINTMAX_C_(0) 0ULL
Chris Lattnerbceaf862009-10-29 04:55:36 +00001090
1091#include <stdint.h>
1092
1093INT8_MAX_ INT8_MAX
1094INT8_MIN_ INT8_MIN
1095UINT8_MAX_ UINT8_MAX
1096INT_LEAST8_MIN_ INT_LEAST8_MIN
1097INT_LEAST8_MAX_ INT_LEAST8_MAX
1098UINT_LEAST8_MAX_ UINT_LEAST8_MAX
1099INT_FAST8_MIN_ INT_FAST8_MIN
1100INT_FAST8_MAX_ INT_FAST8_MAX
1101UINT_FAST8_MAX_ UINT_FAST8_MAX
1102
1103INT16_MAX_ INT16_MAX
1104INT16_MIN_ INT16_MIN
1105UINT16_MAX_ UINT16_MAX
1106INT_LEAST16_MIN_ INT_LEAST16_MIN
1107INT_LEAST16_MAX_ INT_LEAST16_MAX
1108UINT_LEAST16_MAX_ UINT_LEAST16_MAX
1109INT_FAST16_MIN_ INT_FAST16_MIN
1110INT_FAST16_MAX_ INT_FAST16_MAX
1111UINT_FAST16_MAX_ UINT_FAST16_MAX
1112
1113INT32_MAX_ INT32_MAX
1114INT32_MIN_ INT32_MIN
1115UINT32_MAX_ UINT32_MAX
1116INT_LEAST32_MIN_ INT_LEAST32_MIN
1117INT_LEAST32_MAX_ INT_LEAST32_MAX
1118UINT_LEAST32_MAX_ UINT_LEAST32_MAX
1119INT_FAST32_MIN_ INT_FAST32_MIN
1120INT_FAST32_MAX_ INT_FAST32_MAX
1121UINT_FAST32_MAX_ UINT_FAST32_MAX
1122
1123INT64_MAX_ INT64_MAX
1124INT64_MIN_ INT64_MIN
1125UINT64_MAX_ UINT64_MAX
1126INT_LEAST64_MIN_ INT_LEAST64_MIN
1127INT_LEAST64_MAX_ INT_LEAST64_MAX
1128UINT_LEAST64_MAX_ UINT_LEAST64_MAX
1129INT_FAST64_MIN_ INT_FAST64_MIN
1130INT_FAST64_MAX_ INT_FAST64_MAX
1131UINT_FAST64_MAX_ UINT_FAST64_MAX
1132
1133INTPTR_MIN_ INTPTR_MIN
1134INTPTR_MAX_ INTPTR_MAX
1135UINTPTR_MAX_ UINTPTR_MAX
1136PTRDIFF_MIN_ PTRDIFF_MIN
1137PTRDIFF_MAX_ PTRDIFF_MAX
1138SIZE_MAX_ SIZE_MAX
1139
1140INTMAX_MIN_ INTMAX_MIN
1141INTMAX_MAX_ INTMAX_MAX
1142UINTMAX_MAX_ UINTMAX_MAX
1143
1144SIG_ATOMIC_MIN_ SIG_ATOMIC_MIN
1145SIG_ATOMIC_MAX_ SIG_ATOMIC_MAX
1146WINT_MIN_ WINT_MIN
1147WINT_MAX_ WINT_MAX
1148
1149WCHAR_MAX_ WCHAR_MAX
1150WCHAR_MIN_ WCHAR_MIN
1151
1152INT8_C_(0) INT8_C(0)
1153UINT8_C_(0) UINT8_C(0)
1154INT16_C_(0) INT16_C(0)
1155UINT16_C_(0) UINT16_C(0)
1156INT32_C_(0) INT32_C(0)
1157UINT32_C_(0) UINT32_C(0)
1158INT64_C_(0) INT64_C(0)
1159UINT64_C_(0) UINT64_C(0)
1160
1161INTMAX_C_(0) INTMAX_C(0)
1162UINTMAX_C_(0) UINTMAX_C(0)