Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -E -ffreestanding -triple=arm-none-none %s | FileCheck -check-prefix ARM %s |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 2 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 3 | // ARM:typedef signed long long int int64_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 4 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 9 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 10 | // ARM:typedef signed int int32_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 11 | // 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 Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 17 | // ARM:typedef signed short int16_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 18 | // 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 Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 24 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 30 | // |
Ken Dyck | 08321b4 | 2009-11-18 20:24:13 +0000 | [diff] [blame] | 31 | // ARM:typedef int32_t intptr_t; |
| 32 | // ARM:typedef uint32_t uintptr_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 33 | // |
Daniel Dunbar | 96d38c1 | 2010-06-30 06:30:50 +0000 | [diff] [blame] | 34 | // ARM:typedef long long int intmax_t; |
| 35 | // ARM:typedef long long unsigned int uintmax_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 36 | // |
| 37 | // ARM:INT8_MAX_ 127 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 38 | // ARM:INT8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 39 | // ARM:UINT8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 40 | // ARM:INT_LEAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 41 | // ARM:INT_LEAST8_MAX_ 127 |
| 42 | // ARM:UINT_LEAST8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 43 | // ARM:INT_FAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 44 | // ARM:INT_FAST8_MAX_ 127 |
| 45 | // ARM:UINT_FAST8_MAX_ 255 |
| 46 | // |
| 47 | // ARM:INT16_MAX_ 32767 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 48 | // ARM:INT16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 49 | // ARM:UINT16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 50 | // ARM:INT_LEAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 51 | // ARM:INT_LEAST16_MAX_ 32767 |
| 52 | // ARM:UINT_LEAST16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 53 | // ARM:INT_FAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 54 | // 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 Dyck | db57ce5 | 2009-11-18 19:22:15 +0000 | [diff] [blame] | 86 | // ARM:UINTMAX_MAX_ 18446744073709551615ULL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 87 | // |
| 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 Dyck | 6ab25f4 | 2009-11-17 13:54:02 +0000 | [diff] [blame] | 96 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 104 | // |
Ken Dyck | 6ab25f4 | 2009-11-17 13:54:02 +0000 | [diff] [blame] | 105 | // ARM:INTMAX_C_(0) 0LL |
| 106 | // ARM:UINTMAX_C_(0) 0ULL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 107 | // |
| 108 | // |
Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 109 | // RUN: %clang_cc1 -E -ffreestanding -triple=bfin-none-none %s | FileCheck -check-prefix BFIN %s |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 110 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 111 | // BFIN:typedef signed long long int int64_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 112 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 117 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 118 | // BFIN:typedef signed int int32_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 119 | // 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 Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 125 | // BFIN:typedef signed short int16_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 126 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 138 | // |
Ken Dyck | 08321b4 | 2009-11-18 20:24:13 +0000 | [diff] [blame] | 139 | // BFIN:typedef int32_t intptr_t; |
| 140 | // BFIN:typedef uint32_t uintptr_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 141 | // |
Daniel Dunbar | 96d38c1 | 2010-06-30 06:30:50 +0000 | [diff] [blame] | 142 | // BFIN:typedef long long int intmax_t; |
| 143 | // BFIN:typedef long long unsigned int uintmax_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 144 | // |
| 145 | // BFIN:INT8_MAX_ 127 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 146 | // BFIN:INT8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 147 | // BFIN:UINT8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 148 | // BFIN:INT_LEAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 149 | // BFIN:INT_LEAST8_MAX_ 127 |
| 150 | // BFIN:UINT_LEAST8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 151 | // BFIN:INT_FAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 152 | // BFIN:INT_FAST8_MAX_ 127 |
| 153 | // BFIN:UINT_FAST8_MAX_ 255 |
| 154 | // |
| 155 | // BFIN:INT16_MAX_ 32767 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 156 | // BFIN:INT16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 157 | // BFIN:UINT16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 158 | // BFIN:INT_LEAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 159 | // BFIN:INT_LEAST16_MAX_ 32767 |
| 160 | // BFIN:UINT_LEAST16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 161 | // BFIN:INT_FAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 162 | // 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 Dyck | db57ce5 | 2009-11-18 19:22:15 +0000 | [diff] [blame] | 194 | // BFIN:UINTMAX_MAX_ 18446744073709551615ULL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 195 | // |
| 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 Dyck | 6ab25f4 | 2009-11-17 13:54:02 +0000 | [diff] [blame] | 204 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 212 | // |
Ken Dyck | 6ab25f4 | 2009-11-17 13:54:02 +0000 | [diff] [blame] | 213 | // BFIN:INTMAX_C_(0) 0LL |
| 214 | // BFIN:UINTMAX_C_(0) 0ULL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 215 | // |
| 216 | // |
Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 217 | // RUN: %clang_cc1 -E -ffreestanding -triple=i386-none-none %s | FileCheck -check-prefix I386 %s |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 218 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 219 | // I386:typedef signed long long int int64_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 220 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 225 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 226 | // I386:typedef signed int int32_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 227 | // 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 Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 233 | // I386:typedef signed short int16_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 234 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 246 | // |
Ken Dyck | 08321b4 | 2009-11-18 20:24:13 +0000 | [diff] [blame] | 247 | // I386:typedef int32_t intptr_t; |
| 248 | // I386:typedef uint32_t uintptr_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 249 | // |
Daniel Dunbar | 96d38c1 | 2010-06-30 06:30:50 +0000 | [diff] [blame] | 250 | // I386:typedef long long int intmax_t; |
| 251 | // I386:typedef long long unsigned int uintmax_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 252 | // |
| 253 | // I386:INT8_MAX_ 127 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 254 | // I386:INT8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 255 | // I386:UINT8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 256 | // I386:INT_LEAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 257 | // I386:INT_LEAST8_MAX_ 127 |
| 258 | // I386:UINT_LEAST8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 259 | // I386:INT_FAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 260 | // I386:INT_FAST8_MAX_ 127 |
| 261 | // I386:UINT_FAST8_MAX_ 255 |
| 262 | // |
| 263 | // I386:INT16_MAX_ 32767 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 264 | // I386:INT16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 265 | // I386:UINT16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 266 | // I386:INT_LEAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 267 | // I386:INT_LEAST16_MAX_ 32767 |
| 268 | // I386:UINT_LEAST16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 269 | // I386:INT_FAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 270 | // 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 Dyck | db57ce5 | 2009-11-18 19:22:15 +0000 | [diff] [blame] | 302 | // I386:UINTMAX_MAX_ 18446744073709551615ULL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 303 | // |
| 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 Dyck | 6ab25f4 | 2009-11-17 13:54:02 +0000 | [diff] [blame] | 312 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 320 | // |
Ken Dyck | 6ab25f4 | 2009-11-17 13:54:02 +0000 | [diff] [blame] | 321 | // I386:INTMAX_C_(0) 0LL |
| 322 | // I386:UINTMAX_C_(0) 0ULL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 323 | // |
Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 324 | // RUN: %clang_cc1 -E -ffreestanding -triple=msp430-none-none %s | FileCheck -check-prefix MSP430 %s |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 325 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 326 | // MSP430:typedef signed long int int32_t; |
| 327 | // MSP430:typedef unsigned long int uint32_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 328 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 332 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 333 | // MSP430:typedef signed short int16_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 334 | // 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 Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 340 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 346 | // |
Ken Dyck | 08321b4 | 2009-11-18 20:24:13 +0000 | [diff] [blame] | 347 | // MSP430:typedef int16_t intptr_t; |
| 348 | // MSP430:typedef uint16_t uintptr_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 349 | // |
Daniel Dunbar | 96d38c1 | 2010-06-30 06:30:50 +0000 | [diff] [blame] | 350 | // MSP430:typedef long int intmax_t; |
| 351 | // MSP430:typedef long unsigned int uintmax_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 352 | // |
| 353 | // MSP430:INT8_MAX_ 127 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 354 | // MSP430:INT8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 355 | // MSP430:UINT8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 356 | // MSP430:INT_LEAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 357 | // MSP430:INT_LEAST8_MAX_ 127 |
| 358 | // MSP430:UINT_LEAST8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 359 | // MSP430:INT_FAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 360 | // MSP430:INT_FAST8_MAX_ 127 |
| 361 | // MSP430:UINT_FAST8_MAX_ 255 |
| 362 | // |
| 363 | // MSP430:INT16_MAX_ 32767 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 364 | // MSP430:INT16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 365 | // MSP430:UINT16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 366 | // MSP430:INT_LEAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 367 | // MSP430:INT_LEAST16_MAX_ 32767 |
| 368 | // MSP430:UINT_LEAST16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 369 | // MSP430:INT_FAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 370 | // MSP430:INT_FAST16_MAX_ 32767 |
| 371 | // MSP430:UINT_FAST16_MAX_ 65535 |
| 372 | // |
Ken Dyck | 8163841 | 2009-11-17 16:26:27 +0000 | [diff] [blame] | 373 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 382 | // |
Anton Korobeynikov | 79bff43 | 2010-01-14 21:36:52 +0000 | [diff] [blame] | 383 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 392 | // |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 393 | // MSP430:INTPTR_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 394 | // MSP430:INTPTR_MAX_ 32767 |
| 395 | // MSP430:UINTPTR_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 396 | // MSP430:PTRDIFF_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 397 | // MSP430:PTRDIFF_MAX_ 32767 |
| 398 | // MSP430:SIZE_MAX_ 65535 |
| 399 | // |
| 400 | // MSP430:INTMAX_MIN_ (-2147483647L -1) |
| 401 | // MSP430:INTMAX_MAX_ 2147483647L |
Ken Dyck | db57ce5 | 2009-11-18 19:22:15 +0000 | [diff] [blame] | 402 | // MSP430:UINTMAX_MAX_ 4294967295UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 403 | // |
Ken Dyck | 8163841 | 2009-11-17 16:26:27 +0000 | [diff] [blame] | 404 | // MSP430:SIG_ATOMIC_MIN_ (-2147483647L -1) |
| 405 | // MSP430:SIG_ATOMIC_MAX_ 2147483647L |
Ken Dyck | bfec4b0 | 2009-11-19 14:35:19 +0000 | [diff] [blame] | 406 | // MSP430:WINT_MIN_ (-32767 -1) |
| 407 | // MSP430:WINT_MAX_ 32767 |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 408 | // |
Chris Lattner | 9184646 | 2009-11-12 08:04:33 +0000 | [diff] [blame] | 409 | // MSP430:WCHAR_MAX_ 32767 |
| 410 | // MSP430:WCHAR_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 411 | // |
Ken Dyck | 6ab25f4 | 2009-11-17 13:54:02 +0000 | [diff] [blame] | 412 | // 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 Korobeynikov | 79bff43 | 2010-01-14 21:36:52 +0000 | [diff] [blame] | 418 | // MSP430:INT64_C_(0) 0LL |
| 419 | // MSP430:UINT64_C_(0) 0ULL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 420 | // |
Ken Dyck | 832b710 | 2009-11-18 19:42:57 +0000 | [diff] [blame] | 421 | // MSP430:INTMAX_C_(0) 0L |
| 422 | // MSP430:UINTMAX_C_(0) 0UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 423 | // |
Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 424 | // RUN: %clang_cc1 -E -ffreestanding -triple=powerpc64-none-none %s | FileCheck -check-prefix PPC64 %s |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 425 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 426 | // PPC64:typedef signed long int int64_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 427 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 432 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 433 | // PPC64:typedef signed int int32_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 434 | // 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 Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 440 | // PPC64:typedef signed short int16_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 441 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 453 | // |
Ken Dyck | 08321b4 | 2009-11-18 20:24:13 +0000 | [diff] [blame] | 454 | // PPC64:typedef int64_t intptr_t; |
| 455 | // PPC64:typedef uint64_t uintptr_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 456 | // |
Daniel Dunbar | 96d38c1 | 2010-06-30 06:30:50 +0000 | [diff] [blame] | 457 | // PPC64:typedef long int intmax_t; |
| 458 | // PPC64:typedef long unsigned int uintmax_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 459 | // |
| 460 | // PPC64:INT8_MAX_ 127 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 461 | // PPC64:INT8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 462 | // PPC64:UINT8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 463 | // PPC64:INT_LEAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 464 | // PPC64:INT_LEAST8_MAX_ 127 |
| 465 | // PPC64:UINT_LEAST8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 466 | // PPC64:INT_FAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 467 | // PPC64:INT_FAST8_MAX_ 127 |
| 468 | // PPC64:UINT_FAST8_MAX_ 255 |
| 469 | // |
| 470 | // PPC64:INT16_MAX_ 32767 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 471 | // PPC64:INT16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 472 | // PPC64:UINT16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 473 | // PPC64:INT_LEAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 474 | // PPC64:INT_LEAST16_MAX_ 32767 |
| 475 | // PPC64:UINT_LEAST16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 476 | // PPC64:INT_FAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 477 | // 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 Dyck | 8163841 | 2009-11-17 16:26:27 +0000 | [diff] [blame] | 490 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 499 | // |
Ken Dyck | 8163841 | 2009-11-17 16:26:27 +0000 | [diff] [blame] | 500 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 506 | // |
| 507 | // PPC64:INTMAX_MIN_ (-9223372036854775807L -1) |
| 508 | // PPC64:INTMAX_MAX_ 9223372036854775807L |
Ken Dyck | db57ce5 | 2009-11-18 19:22:15 +0000 | [diff] [blame] | 509 | // PPC64:UINTMAX_MAX_ 18446744073709551615UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 510 | // |
| 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 Dyck | 6ab25f4 | 2009-11-17 13:54:02 +0000 | [diff] [blame] | 519 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 527 | // |
Ken Dyck | 832b710 | 2009-11-18 19:42:57 +0000 | [diff] [blame] | 528 | // PPC64:INTMAX_C_(0) 0L |
| 529 | // PPC64:UINTMAX_C_(0) 0UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 530 | // |
Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 531 | // RUN: %clang_cc1 -E -ffreestanding -triple=powerpc-none-none %s | FileCheck -check-prefix PPC %s |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 532 | // |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 533 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 534 | // PPC:typedef signed long long int int64_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 535 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 540 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 541 | // PPC:typedef signed int int32_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 542 | // 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 Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 548 | // PPC:typedef signed short int16_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 549 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 561 | // |
Ken Dyck | 08321b4 | 2009-11-18 20:24:13 +0000 | [diff] [blame] | 562 | // PPC:typedef int32_t intptr_t; |
| 563 | // PPC:typedef uint32_t uintptr_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 564 | // |
Daniel Dunbar | 96d38c1 | 2010-06-30 06:30:50 +0000 | [diff] [blame] | 565 | // PPC:typedef long long int intmax_t; |
| 566 | // PPC:typedef long long unsigned int uintmax_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 567 | // |
| 568 | // PPC:INT8_MAX_ 127 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 569 | // PPC:INT8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 570 | // PPC:UINT8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 571 | // PPC:INT_LEAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 572 | // PPC:INT_LEAST8_MAX_ 127 |
| 573 | // PPC:UINT_LEAST8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 574 | // PPC:INT_FAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 575 | // PPC:INT_FAST8_MAX_ 127 |
| 576 | // PPC:UINT_FAST8_MAX_ 255 |
| 577 | // |
| 578 | // PPC:INT16_MAX_ 32767 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 579 | // PPC:INT16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 580 | // PPC:UINT16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 581 | // PPC:INT_LEAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 582 | // PPC:INT_LEAST16_MAX_ 32767 |
| 583 | // PPC:UINT_LEAST16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 584 | // PPC:INT_FAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 585 | // 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 Dyck | db57ce5 | 2009-11-18 19:22:15 +0000 | [diff] [blame] | 617 | // PPC:UINTMAX_MAX_ 18446744073709551615ULL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 618 | // |
| 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 Dyck | 6ab25f4 | 2009-11-17 13:54:02 +0000 | [diff] [blame] | 627 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 635 | // |
Ken Dyck | 6ab25f4 | 2009-11-17 13:54:02 +0000 | [diff] [blame] | 636 | // PPC:INTMAX_C_(0) 0LL |
| 637 | // PPC:UINTMAX_C_(0) 0ULL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 638 | // |
Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 639 | // RUN: %clang_cc1 -E -ffreestanding -triple=s390x-none-none %s | FileCheck -check-prefix S390X %s |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 640 | // |
Daniel Dunbar | 7f3a545 | 2010-06-30 06:30:56 +0000 | [diff] [blame] | 641 | // S390X:typedef signed long long int int64_t; |
| 642 | // S390X:typedef unsigned long long int uint64_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 643 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 647 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 648 | // S390X:typedef signed int int32_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 649 | // 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 Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 655 | // S390X:typedef signed short int16_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 656 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 668 | // |
Ken Dyck | 08321b4 | 2009-11-18 20:24:13 +0000 | [diff] [blame] | 669 | // S390X:typedef int64_t intptr_t; |
| 670 | // S390X:typedef uint64_t uintptr_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 671 | // |
Daniel Dunbar | 96d38c1 | 2010-06-30 06:30:50 +0000 | [diff] [blame] | 672 | // S390X:typedef long long int intmax_t; |
| 673 | // S390X:typedef long long unsigned int uintmax_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 674 | // |
| 675 | // S390X:INT8_MAX_ 127 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 676 | // S390X:INT8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 677 | // S390X:UINT8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 678 | // S390X:INT_LEAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 679 | // S390X:INT_LEAST8_MAX_ 127 |
| 680 | // S390X:UINT_LEAST8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 681 | // S390X:INT_FAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 682 | // S390X:INT_FAST8_MAX_ 127 |
| 683 | // S390X:UINT_FAST8_MAX_ 255 |
| 684 | // |
| 685 | // S390X:INT16_MAX_ 32767 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 686 | // S390X:INT16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 687 | // S390X:UINT16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 688 | // S390X:INT_LEAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 689 | // S390X:INT_LEAST16_MAX_ 32767 |
| 690 | // S390X:UINT_LEAST16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 691 | // S390X:INT_FAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 692 | // 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 Dyck | 8163841 | 2009-11-17 16:26:27 +0000 | [diff] [blame] | 705 | // S390X:INT64_MAX_ 9223372036854775807L |
Daniel Dunbar | 7f3a545 | 2010-06-30 06:30:56 +0000 | [diff] [blame] | 706 | // S390X:INT64_MIN_ (-9223372036854775807LL -1) |
Ken Dyck | 8163841 | 2009-11-17 16:26:27 +0000 | [diff] [blame] | 707 | // S390X:UINT64_MAX_ 18446744073709551615UL |
Daniel Dunbar | 7f3a545 | 2010-06-30 06:30:56 +0000 | [diff] [blame] | 708 | // S390X:INT_LEAST64_MIN_ (-9223372036854775807LL -1) |
Ken Dyck | 8163841 | 2009-11-17 16:26:27 +0000 | [diff] [blame] | 709 | // S390X:INT_LEAST64_MAX_ 9223372036854775807L |
| 710 | // S390X:UINT_LEAST64_MAX_ 18446744073709551615UL |
Daniel Dunbar | 7f3a545 | 2010-06-30 06:30:56 +0000 | [diff] [blame] | 711 | // S390X:INT_FAST64_MIN_ (-9223372036854775807LL -1) |
Ken Dyck | 8163841 | 2009-11-17 16:26:27 +0000 | [diff] [blame] | 712 | // S390X:INT_FAST64_MAX_ 9223372036854775807L |
| 713 | // S390X:UINT_FAST64_MAX_ 18446744073709551615UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 714 | // |
Daniel Dunbar | 7f3a545 | 2010-06-30 06:30:56 +0000 | [diff] [blame] | 715 | // S390X:INTPTR_MIN_ (-9223372036854775807LL -1) |
Ken Dyck | 8163841 | 2009-11-17 16:26:27 +0000 | [diff] [blame] | 716 | // S390X:INTPTR_MAX_ 9223372036854775807L |
| 717 | // S390X:UINTPTR_MAX_ 18446744073709551615UL |
Daniel Dunbar | 7f3a545 | 2010-06-30 06:30:56 +0000 | [diff] [blame] | 718 | // S390X:PTRDIFF_MIN_ (-9223372036854775807LL -1) |
Ken Dyck | 8163841 | 2009-11-17 16:26:27 +0000 | [diff] [blame] | 719 | // S390X:PTRDIFF_MAX_ 9223372036854775807L |
| 720 | // S390X:SIZE_MAX_ 18446744073709551615UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 721 | // |
Daniel Dunbar | 7f3a545 | 2010-06-30 06:30:56 +0000 | [diff] [blame] | 722 | // S390X:INTMAX_MIN_ (-9223372036854775807LL -1) |
Ken Dyck | db57ce5 | 2009-11-18 19:22:15 +0000 | [diff] [blame] | 723 | // S390X:INTMAX_MAX_ 9223372036854775807L |
| 724 | // S390X:UINTMAX_MAX_ 18446744073709551615UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 725 | // |
| 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 Dyck | 6ab25f4 | 2009-11-17 13:54:02 +0000 | [diff] [blame] | 734 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 742 | // |
Ken Dyck | 832b710 | 2009-11-18 19:42:57 +0000 | [diff] [blame] | 743 | // S390X:INTMAX_C_(0) 0L |
| 744 | // S390X:UINTMAX_C_(0) 0UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 745 | // |
Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 746 | // RUN: %clang_cc1 -E -ffreestanding -triple=sparc-none-none %s | FileCheck -check-prefix SPARC %s |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 747 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 748 | // SPARC:typedef signed long long int int64_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 749 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 754 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 755 | // SPARC:typedef signed int int32_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 756 | // 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 Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 762 | // SPARC:typedef signed short int16_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 763 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 775 | // |
Ken Dyck | 08321b4 | 2009-11-18 20:24:13 +0000 | [diff] [blame] | 776 | // SPARC:typedef int32_t intptr_t; |
| 777 | // SPARC:typedef uint32_t uintptr_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 778 | // |
Daniel Dunbar | 96d38c1 | 2010-06-30 06:30:50 +0000 | [diff] [blame] | 779 | // SPARC:typedef long long int intmax_t; |
| 780 | // SPARC:typedef long long unsigned int uintmax_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 781 | // |
| 782 | // SPARC:INT8_MAX_ 127 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 783 | // SPARC:INT8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 784 | // SPARC:UINT8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 785 | // SPARC:INT_LEAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 786 | // SPARC:INT_LEAST8_MAX_ 127 |
| 787 | // SPARC:UINT_LEAST8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 788 | // SPARC:INT_FAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 789 | // SPARC:INT_FAST8_MAX_ 127 |
| 790 | // SPARC:UINT_FAST8_MAX_ 255 |
| 791 | // |
| 792 | // SPARC:INT16_MAX_ 32767 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 793 | // SPARC:INT16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 794 | // SPARC:UINT16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 795 | // SPARC:INT_LEAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 796 | // SPARC:INT_LEAST16_MAX_ 32767 |
| 797 | // SPARC:UINT_LEAST16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 798 | // SPARC:INT_FAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 799 | // 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 Dyck | db57ce5 | 2009-11-18 19:22:15 +0000 | [diff] [blame] | 831 | // SPARC:UINTMAX_MAX_ 18446744073709551615ULL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 832 | // |
| 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 Dyck | 6ab25f4 | 2009-11-17 13:54:02 +0000 | [diff] [blame] | 841 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 849 | // |
Ken Dyck | 6ab25f4 | 2009-11-17 13:54:02 +0000 | [diff] [blame] | 850 | // SPARC:INTMAX_C_(0) 0LL |
| 851 | // SPARC:UINTMAX_C_(0) 0ULL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 852 | // |
Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 853 | // RUN: %clang_cc1 -E -ffreestanding -triple=tce-none-none %s | FileCheck -check-prefix TCE %s |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 854 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 855 | // TCE:typedef signed int int32_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 856 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 861 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 862 | // TCE:typedef signed short int16_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 863 | // 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 Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 869 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 875 | // |
Ken Dyck | 08321b4 | 2009-11-18 20:24:13 +0000 | [diff] [blame] | 876 | // TCE:typedef int32_t intptr_t; |
| 877 | // TCE:typedef uint32_t uintptr_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 878 | // |
Daniel Dunbar | 96d38c1 | 2010-06-30 06:30:50 +0000 | [diff] [blame] | 879 | // TCE:typedef long int intmax_t; |
| 880 | // TCE:typedef long unsigned int uintmax_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 881 | // |
| 882 | // TCE:INT8_MAX_ 127 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 883 | // TCE:INT8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 884 | // TCE:UINT8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 885 | // TCE:INT_LEAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 886 | // TCE:INT_LEAST8_MAX_ 127 |
| 887 | // TCE:UINT_LEAST8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 888 | // TCE:INT_FAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 889 | // TCE:INT_FAST8_MAX_ 127 |
| 890 | // TCE:UINT_FAST8_MAX_ 255 |
| 891 | // |
| 892 | // TCE:INT16_MAX_ 32767 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 893 | // TCE:INT16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 894 | // TCE:UINT16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 895 | // TCE:INT_LEAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 896 | // TCE:INT_LEAST16_MAX_ 32767 |
| 897 | // TCE:UINT_LEAST16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 898 | // TCE:INT_FAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 899 | // 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 Dyck | db57ce5 | 2009-11-18 19:22:15 +0000 | [diff] [blame] | 929 | // TCE:INTMAX_MIN_ (-2147483647 -1) |
| 930 | // TCE:INTMAX_MAX_ 2147483647 |
| 931 | // TCE:UINTMAX_MAX_ 4294967295U |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 932 | // |
| 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 Dyck | 6ab25f4 | 2009-11-17 13:54:02 +0000 | [diff] [blame] | 941 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 947 | // TCE:INT64_C_(0) INT64_C(0) |
| 948 | // TCE:UINT64_C_(0) UINT64_C(0) |
| 949 | // |
Ken Dyck | 832b710 | 2009-11-18 19:42:57 +0000 | [diff] [blame] | 950 | // TCE:INTMAX_C_(0) 0 |
| 951 | // TCE:UINTMAX_C_(0) 0U |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 952 | // |
Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 953 | // RUN: %clang_cc1 -E -ffreestanding -triple=x86_64-none-none %s | FileCheck -check-prefix X86_64 %s |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 954 | // |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 955 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 956 | // X86_64:typedef signed long int int64_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 957 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 962 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 963 | // X86_64:typedef signed int int32_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 964 | // 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 Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 970 | // X86_64:typedef signed short int16_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 971 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 983 | // |
Ken Dyck | 08321b4 | 2009-11-18 20:24:13 +0000 | [diff] [blame] | 984 | // X86_64:typedef int64_t intptr_t; |
| 985 | // X86_64:typedef uint64_t uintptr_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 986 | // |
Daniel Dunbar | 96d38c1 | 2010-06-30 06:30:50 +0000 | [diff] [blame] | 987 | // X86_64:typedef long int intmax_t; |
| 988 | // X86_64:typedef long unsigned int uintmax_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 989 | // |
| 990 | // X86_64:INT8_MAX_ 127 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 991 | // X86_64:INT8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 992 | // X86_64:UINT8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 993 | // X86_64:INT_LEAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 994 | // X86_64:INT_LEAST8_MAX_ 127 |
| 995 | // X86_64:UINT_LEAST8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 996 | // X86_64:INT_FAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 997 | // X86_64:INT_FAST8_MAX_ 127 |
| 998 | // X86_64:UINT_FAST8_MAX_ 255 |
| 999 | // |
| 1000 | // X86_64:INT16_MAX_ 32767 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 1001 | // X86_64:INT16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1002 | // X86_64:UINT16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 1003 | // X86_64:INT_LEAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1004 | // X86_64:INT_LEAST16_MAX_ 32767 |
| 1005 | // X86_64:UINT_LEAST16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 1006 | // X86_64:INT_FAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1007 | // 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 Dyck | 8163841 | 2009-11-17 16:26:27 +0000 | [diff] [blame] | 1020 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1029 | // |
Ken Dyck | 8163841 | 2009-11-17 16:26:27 +0000 | [diff] [blame] | 1030 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1036 | // |
| 1037 | // X86_64:INTMAX_MIN_ (-9223372036854775807L -1) |
| 1038 | // X86_64:INTMAX_MAX_ 9223372036854775807L |
Ken Dyck | db57ce5 | 2009-11-18 19:22:15 +0000 | [diff] [blame] | 1039 | // X86_64:UINTMAX_MAX_ 18446744073709551615UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1040 | // |
| 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 Dyck | 6ab25f4 | 2009-11-17 13:54:02 +0000 | [diff] [blame] | 1049 | // 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 Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1057 | // |
Ken Dyck | 832b710 | 2009-11-18 19:42:57 +0000 | [diff] [blame] | 1058 | // X86_64:INTMAX_C_(0) 0L |
| 1059 | // X86_64:UINTMAX_C_(0) 0UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1060 | // |
Ken Dyck | aface1b | 2009-11-20 16:37:35 +0000 | [diff] [blame] | 1061 | // |
| 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 Dunbar | 96d38c1 | 2010-06-30 06:30:50 +0000 | [diff] [blame] | 1068 | // 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 Dyck | aface1b | 2009-11-20 16:37:35 +0000 | [diff] [blame] | 1069 | // JOIN:typedef int32_t intptr_t; |
| 1070 | // JOIN:typedef uint32_t uintptr_t; |
Daniel Dunbar | 96d38c1 | 2010-06-30 06:30:50 +0000 | [diff] [blame] | 1071 | // JOIN:typedef __INTMAX_TYPE__ intmax_t; |
| 1072 | // JOIN:typedef __UINTMAX_TYPE__ uintmax_t; |
Ken Dyck | a2e9284 | 2009-11-20 16:44:38 +0000 | [diff] [blame] | 1073 | // 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 Dyck | fdb4324 | 2009-11-20 16:49:10 +0000 | [diff] [blame] | 1088 | // JOIN:INTMAX_C_(0) 0LL |
| 1089 | // JOIN:UINTMAX_C_(0) 0ULL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1090 | |
| 1091 | #include <stdint.h> |
| 1092 | |
| 1093 | INT8_MAX_ INT8_MAX |
| 1094 | INT8_MIN_ INT8_MIN |
| 1095 | UINT8_MAX_ UINT8_MAX |
| 1096 | INT_LEAST8_MIN_ INT_LEAST8_MIN |
| 1097 | INT_LEAST8_MAX_ INT_LEAST8_MAX |
| 1098 | UINT_LEAST8_MAX_ UINT_LEAST8_MAX |
| 1099 | INT_FAST8_MIN_ INT_FAST8_MIN |
| 1100 | INT_FAST8_MAX_ INT_FAST8_MAX |
| 1101 | UINT_FAST8_MAX_ UINT_FAST8_MAX |
| 1102 | |
| 1103 | INT16_MAX_ INT16_MAX |
| 1104 | INT16_MIN_ INT16_MIN |
| 1105 | UINT16_MAX_ UINT16_MAX |
| 1106 | INT_LEAST16_MIN_ INT_LEAST16_MIN |
| 1107 | INT_LEAST16_MAX_ INT_LEAST16_MAX |
| 1108 | UINT_LEAST16_MAX_ UINT_LEAST16_MAX |
| 1109 | INT_FAST16_MIN_ INT_FAST16_MIN |
| 1110 | INT_FAST16_MAX_ INT_FAST16_MAX |
| 1111 | UINT_FAST16_MAX_ UINT_FAST16_MAX |
| 1112 | |
| 1113 | INT32_MAX_ INT32_MAX |
| 1114 | INT32_MIN_ INT32_MIN |
| 1115 | UINT32_MAX_ UINT32_MAX |
| 1116 | INT_LEAST32_MIN_ INT_LEAST32_MIN |
| 1117 | INT_LEAST32_MAX_ INT_LEAST32_MAX |
| 1118 | UINT_LEAST32_MAX_ UINT_LEAST32_MAX |
| 1119 | INT_FAST32_MIN_ INT_FAST32_MIN |
| 1120 | INT_FAST32_MAX_ INT_FAST32_MAX |
| 1121 | UINT_FAST32_MAX_ UINT_FAST32_MAX |
| 1122 | |
| 1123 | INT64_MAX_ INT64_MAX |
| 1124 | INT64_MIN_ INT64_MIN |
| 1125 | UINT64_MAX_ UINT64_MAX |
| 1126 | INT_LEAST64_MIN_ INT_LEAST64_MIN |
| 1127 | INT_LEAST64_MAX_ INT_LEAST64_MAX |
| 1128 | UINT_LEAST64_MAX_ UINT_LEAST64_MAX |
| 1129 | INT_FAST64_MIN_ INT_FAST64_MIN |
| 1130 | INT_FAST64_MAX_ INT_FAST64_MAX |
| 1131 | UINT_FAST64_MAX_ UINT_FAST64_MAX |
| 1132 | |
| 1133 | INTPTR_MIN_ INTPTR_MIN |
| 1134 | INTPTR_MAX_ INTPTR_MAX |
| 1135 | UINTPTR_MAX_ UINTPTR_MAX |
| 1136 | PTRDIFF_MIN_ PTRDIFF_MIN |
| 1137 | PTRDIFF_MAX_ PTRDIFF_MAX |
| 1138 | SIZE_MAX_ SIZE_MAX |
| 1139 | |
| 1140 | INTMAX_MIN_ INTMAX_MIN |
| 1141 | INTMAX_MAX_ INTMAX_MAX |
| 1142 | UINTMAX_MAX_ UINTMAX_MAX |
| 1143 | |
| 1144 | SIG_ATOMIC_MIN_ SIG_ATOMIC_MIN |
| 1145 | SIG_ATOMIC_MAX_ SIG_ATOMIC_MAX |
| 1146 | WINT_MIN_ WINT_MIN |
| 1147 | WINT_MAX_ WINT_MAX |
| 1148 | |
| 1149 | WCHAR_MAX_ WCHAR_MAX |
| 1150 | WCHAR_MIN_ WCHAR_MIN |
| 1151 | |
| 1152 | INT8_C_(0) INT8_C(0) |
| 1153 | UINT8_C_(0) UINT8_C(0) |
| 1154 | INT16_C_(0) INT16_C(0) |
| 1155 | UINT16_C_(0) UINT16_C(0) |
| 1156 | INT32_C_(0) INT32_C(0) |
| 1157 | UINT32_C_(0) UINT32_C(0) |
| 1158 | INT64_C_(0) INT64_C(0) |
| 1159 | UINT64_C_(0) UINT64_C(0) |
| 1160 | |
| 1161 | INTMAX_C_(0) INTMAX_C(0) |
| 1162 | UINTMAX_C_(0) UINTMAX_C(0) |