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=pic16-none-none %s | FileCheck -check-prefix PIC16 %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 | // PIC16:typedef signed long int int32_t; |
| 427 | // PIC16:typedef unsigned long int uint32_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 428 | // PIC16:typedef int32_t int_least32_t; |
| 429 | // PIC16:typedef uint32_t uint_least32_t; |
| 430 | // PIC16:typedef int32_t int_fast32_t; |
| 431 | // PIC16:typedef uint32_t uint_fast32_t; |
Chris 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 | // PIC16:typedef signed short int16_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 434 | // PIC16:typedef unsigned short uint16_t; |
| 435 | // PIC16:typedef int16_t int_least16_t; |
| 436 | // PIC16:typedef uint16_t uint_least16_t; |
| 437 | // PIC16:typedef int16_t int_fast16_t; |
| 438 | // PIC16:typedef uint16_t uint_fast16_t; |
| 439 | // |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 440 | // PIC16:typedef signed char int8_t; |
| 441 | // PIC16:typedef unsigned char uint8_t; |
| 442 | // PIC16:typedef int8_t int_least8_t; |
| 443 | // PIC16:typedef uint8_t uint_least8_t; |
| 444 | // PIC16:typedef int8_t int_fast8_t; |
| 445 | // PIC16:typedef uint8_t uint_fast8_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 446 | // |
Ken Dyck | 08321b4 | 2009-11-18 20:24:13 +0000 | [diff] [blame] | 447 | // PIC16:typedef int16_t intptr_t; |
| 448 | // PIC16:typedef uint16_t uintptr_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 449 | // |
Daniel Dunbar | 96d38c1 | 2010-06-30 06:30:50 +0000 | [diff] [blame] | 450 | // PIC16:typedef long int intmax_t; |
| 451 | // PIC16:typedef long unsigned int uintmax_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 452 | // |
| 453 | // PIC16:INT8_MAX_ 127 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 454 | // PIC16:INT8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 455 | // PIC16:UINT8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 456 | // PIC16:INT_LEAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 457 | // PIC16:INT_LEAST8_MAX_ 127 |
| 458 | // PIC16:UINT_LEAST8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 459 | // PIC16:INT_FAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 460 | // PIC16:INT_FAST8_MAX_ 127 |
| 461 | // PIC16:UINT_FAST8_MAX_ 255 |
| 462 | // |
| 463 | // PIC16:INT16_MAX_ 32767 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 464 | // PIC16:INT16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 465 | // PIC16:UINT16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 466 | // PIC16:INT_LEAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 467 | // PIC16:INT_LEAST16_MAX_ 32767 |
| 468 | // PIC16:UINT_LEAST16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 469 | // PIC16:INT_FAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 470 | // PIC16:INT_FAST16_MAX_ 32767 |
| 471 | // PIC16:UINT_FAST16_MAX_ 65535 |
| 472 | // |
Ken Dyck | 8163841 | 2009-11-17 16:26:27 +0000 | [diff] [blame] | 473 | // PIC16:INT32_MAX_ 2147483647L |
| 474 | // PIC16:INT32_MIN_ (-2147483647L -1) |
| 475 | // PIC16:UINT32_MAX_ 4294967295UL |
| 476 | // PIC16:INT_LEAST32_MIN_ (-2147483647L -1) |
| 477 | // PIC16:INT_LEAST32_MAX_ 2147483647L |
| 478 | // PIC16:UINT_LEAST32_MAX_ 4294967295UL |
| 479 | // PIC16:INT_FAST32_MIN_ (-2147483647L -1) |
| 480 | // PIC16:INT_FAST32_MAX_ 2147483647L |
| 481 | // PIC16:UINT_FAST32_MAX_ 4294967295UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 482 | // |
| 483 | // PIC16:INT64_MAX_ INT64_MAX |
| 484 | // PIC16:INT64_MIN_ INT64_MIN |
| 485 | // PIC16:UINT64_MAX_ UINT64_MAX |
| 486 | // PIC16:INT_LEAST64_MIN_ INT_LEAST64_MIN |
| 487 | // PIC16:INT_LEAST64_MAX_ INT_LEAST64_MAX |
| 488 | // PIC16:UINT_LEAST64_MAX_ UINT_LEAST64_MAX |
| 489 | // PIC16:INT_FAST64_MIN_ INT_FAST64_MIN |
| 490 | // PIC16:INT_FAST64_MAX_ INT_FAST64_MAX |
| 491 | // PIC16:UINT_FAST64_MAX_ UINT_FAST64_MAX |
| 492 | // |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 493 | // PIC16:INTPTR_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 494 | // PIC16:INTPTR_MAX_ 32767 |
| 495 | // PIC16:UINTPTR_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 496 | // PIC16:PTRDIFF_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 497 | // PIC16:PTRDIFF_MAX_ 32767 |
| 498 | // PIC16:SIZE_MAX_ 65535 |
| 499 | // |
| 500 | // PIC16:INTMAX_MIN_ (-2147483647L -1) |
| 501 | // PIC16:INTMAX_MAX_ 2147483647L |
Ken Dyck | db57ce5 | 2009-11-18 19:22:15 +0000 | [diff] [blame] | 502 | // PIC16:UINTMAX_MAX_ 4294967295UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 503 | // |
Ken Dyck | 8163841 | 2009-11-17 16:26:27 +0000 | [diff] [blame] | 504 | // PIC16:SIG_ATOMIC_MIN_ (-2147483647L -1) |
| 505 | // PIC16:SIG_ATOMIC_MAX_ 2147483647L |
Ken Dyck | bfec4b0 | 2009-11-19 14:35:19 +0000 | [diff] [blame] | 506 | // PIC16:WINT_MIN_ (-32767 -1) |
| 507 | // PIC16:WINT_MAX_ 32767 |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 508 | // |
Chris Lattner | 9184646 | 2009-11-12 08:04:33 +0000 | [diff] [blame] | 509 | // PIC16:WCHAR_MAX_ 32767 |
| 510 | // PIC16:WCHAR_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 511 | // |
Ken Dyck | 6ab25f4 | 2009-11-17 13:54:02 +0000 | [diff] [blame] | 512 | // PIC16:INT8_C_(0) 0 |
| 513 | // PIC16:UINT8_C_(0) 0U |
| 514 | // PIC16:INT16_C_(0) 0 |
| 515 | // PIC16:UINT16_C_(0) 0U |
| 516 | // PIC16:INT32_C_(0) 0L |
| 517 | // PIC16:UINT32_C_(0) 0UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 518 | // PIC16:INT64_C_(0) INT64_C(0) |
| 519 | // PIC16:UINT64_C_(0) UINT64_C(0) |
| 520 | // |
Ken Dyck | 832b710 | 2009-11-18 19:42:57 +0000 | [diff] [blame] | 521 | // PIC16:INTMAX_C_(0) 0L |
| 522 | // PIC16:UINTMAX_C_(0) 0UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 523 | // |
Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 524 | // 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] | 525 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 526 | // PPC64:typedef signed long int int64_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 527 | // PPC64:typedef unsigned long int uint64_t; |
| 528 | // PPC64:typedef int64_t int_least64_t; |
| 529 | // PPC64:typedef uint64_t uint_least64_t; |
| 530 | // PPC64:typedef int64_t int_fast64_t; |
| 531 | // PPC64:typedef uint64_t uint_fast64_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 532 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 533 | // PPC64:typedef signed int int32_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 534 | // PPC64:typedef unsigned int uint32_t; |
| 535 | // PPC64:typedef int32_t int_least32_t; |
| 536 | // PPC64:typedef uint32_t uint_least32_t; |
| 537 | // PPC64:typedef int32_t int_fast32_t; |
| 538 | // PPC64:typedef uint32_t uint_fast32_t; |
| 539 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 540 | // PPC64:typedef signed short int16_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 541 | // PPC64:typedef unsigned short uint16_t; |
| 542 | // PPC64:typedef int16_t int_least16_t; |
| 543 | // PPC64:typedef uint16_t uint_least16_t; |
| 544 | // PPC64:typedef int16_t int_fast16_t; |
| 545 | // PPC64:typedef uint16_t uint_fast16_t; |
| 546 | // |
| 547 | // PPC64:typedef signed char int8_t; |
| 548 | // PPC64:typedef unsigned char uint8_t; |
| 549 | // PPC64:typedef int8_t int_least8_t; |
| 550 | // PPC64:typedef uint8_t uint_least8_t; |
| 551 | // PPC64:typedef int8_t int_fast8_t; |
| 552 | // PPC64:typedef uint8_t uint_fast8_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 553 | // |
Ken Dyck | 08321b4 | 2009-11-18 20:24:13 +0000 | [diff] [blame] | 554 | // PPC64:typedef int64_t intptr_t; |
| 555 | // PPC64:typedef uint64_t uintptr_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 556 | // |
Daniel Dunbar | 96d38c1 | 2010-06-30 06:30:50 +0000 | [diff] [blame] | 557 | // PPC64:typedef long int intmax_t; |
| 558 | // PPC64:typedef long unsigned int uintmax_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 559 | // |
| 560 | // PPC64:INT8_MAX_ 127 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 561 | // PPC64:INT8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 562 | // PPC64:UINT8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 563 | // PPC64:INT_LEAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 564 | // PPC64:INT_LEAST8_MAX_ 127 |
| 565 | // PPC64:UINT_LEAST8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 566 | // PPC64:INT_FAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 567 | // PPC64:INT_FAST8_MAX_ 127 |
| 568 | // PPC64:UINT_FAST8_MAX_ 255 |
| 569 | // |
| 570 | // PPC64:INT16_MAX_ 32767 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 571 | // PPC64:INT16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 572 | // PPC64:UINT16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 573 | // PPC64:INT_LEAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 574 | // PPC64:INT_LEAST16_MAX_ 32767 |
| 575 | // PPC64:UINT_LEAST16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 576 | // PPC64:INT_FAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 577 | // PPC64:INT_FAST16_MAX_ 32767 |
| 578 | // PPC64:UINT_FAST16_MAX_ 65535 |
| 579 | // |
| 580 | // PPC64:INT32_MAX_ 2147483647 |
| 581 | // PPC64:INT32_MIN_ (-2147483647 -1) |
| 582 | // PPC64:UINT32_MAX_ 4294967295U |
| 583 | // PPC64:INT_LEAST32_MIN_ (-2147483647 -1) |
| 584 | // PPC64:INT_LEAST32_MAX_ 2147483647 |
| 585 | // PPC64:UINT_LEAST32_MAX_ 4294967295U |
| 586 | // PPC64:INT_FAST32_MIN_ (-2147483647 -1) |
| 587 | // PPC64:INT_FAST32_MAX_ 2147483647 |
| 588 | // PPC64:UINT_FAST32_MAX_ 4294967295U |
| 589 | // |
Ken Dyck | 8163841 | 2009-11-17 16:26:27 +0000 | [diff] [blame] | 590 | // PPC64:INT64_MAX_ 9223372036854775807L |
| 591 | // PPC64:INT64_MIN_ (-9223372036854775807L -1) |
| 592 | // PPC64:UINT64_MAX_ 18446744073709551615UL |
| 593 | // PPC64:INT_LEAST64_MIN_ (-9223372036854775807L -1) |
| 594 | // PPC64:INT_LEAST64_MAX_ 9223372036854775807L |
| 595 | // PPC64:UINT_LEAST64_MAX_ 18446744073709551615UL |
| 596 | // PPC64:INT_FAST64_MIN_ (-9223372036854775807L -1) |
| 597 | // PPC64:INT_FAST64_MAX_ 9223372036854775807L |
| 598 | // PPC64:UINT_FAST64_MAX_ 18446744073709551615UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 599 | // |
Ken Dyck | 8163841 | 2009-11-17 16:26:27 +0000 | [diff] [blame] | 600 | // PPC64:INTPTR_MIN_ (-9223372036854775807L -1) |
| 601 | // PPC64:INTPTR_MAX_ 9223372036854775807L |
| 602 | // PPC64:UINTPTR_MAX_ 18446744073709551615UL |
| 603 | // PPC64:PTRDIFF_MIN_ (-9223372036854775807L -1) |
| 604 | // PPC64:PTRDIFF_MAX_ 9223372036854775807L |
| 605 | // PPC64:SIZE_MAX_ 18446744073709551615UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 606 | // |
| 607 | // PPC64:INTMAX_MIN_ (-9223372036854775807L -1) |
| 608 | // PPC64:INTMAX_MAX_ 9223372036854775807L |
Ken Dyck | db57ce5 | 2009-11-18 19:22:15 +0000 | [diff] [blame] | 609 | // PPC64:UINTMAX_MAX_ 18446744073709551615UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 610 | // |
| 611 | // PPC64:SIG_ATOMIC_MIN_ (-2147483647 -1) |
| 612 | // PPC64:SIG_ATOMIC_MAX_ 2147483647 |
| 613 | // PPC64:WINT_MIN_ (-2147483647 -1) |
| 614 | // PPC64:WINT_MAX_ 2147483647 |
| 615 | // |
| 616 | // PPC64:WCHAR_MAX_ 2147483647 |
| 617 | // PPC64:WCHAR_MIN_ (-2147483647 -1) |
| 618 | // |
Ken Dyck | 6ab25f4 | 2009-11-17 13:54:02 +0000 | [diff] [blame] | 619 | // PPC64:INT8_C_(0) 0 |
| 620 | // PPC64:UINT8_C_(0) 0U |
| 621 | // PPC64:INT16_C_(0) 0 |
| 622 | // PPC64:UINT16_C_(0) 0U |
| 623 | // PPC64:INT32_C_(0) 0 |
| 624 | // PPC64:UINT32_C_(0) 0U |
| 625 | // PPC64:INT64_C_(0) 0L |
| 626 | // PPC64:UINT64_C_(0) 0UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 627 | // |
Ken Dyck | 832b710 | 2009-11-18 19:42:57 +0000 | [diff] [blame] | 628 | // PPC64:INTMAX_C_(0) 0L |
| 629 | // PPC64:UINTMAX_C_(0) 0UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 630 | // |
Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 631 | // 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] | 632 | // |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 633 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 634 | // PPC:typedef signed long long int int64_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 635 | // PPC:typedef unsigned long long int uint64_t; |
| 636 | // PPC:typedef int64_t int_least64_t; |
| 637 | // PPC:typedef uint64_t uint_least64_t; |
| 638 | // PPC:typedef int64_t int_fast64_t; |
| 639 | // PPC:typedef uint64_t uint_fast64_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 640 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 641 | // PPC:typedef signed int int32_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 642 | // PPC:typedef unsigned int uint32_t; |
| 643 | // PPC:typedef int32_t int_least32_t; |
| 644 | // PPC:typedef uint32_t uint_least32_t; |
| 645 | // PPC:typedef int32_t int_fast32_t; |
| 646 | // PPC:typedef uint32_t uint_fast32_t; |
| 647 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 648 | // PPC:typedef signed short int16_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 649 | // PPC:typedef unsigned short uint16_t; |
| 650 | // PPC:typedef int16_t int_least16_t; |
| 651 | // PPC:typedef uint16_t uint_least16_t; |
| 652 | // PPC:typedef int16_t int_fast16_t; |
| 653 | // PPC:typedef uint16_t uint_fast16_t; |
| 654 | // |
| 655 | // PPC:typedef signed char int8_t; |
| 656 | // PPC:typedef unsigned char uint8_t; |
| 657 | // PPC:typedef int8_t int_least8_t; |
| 658 | // PPC:typedef uint8_t uint_least8_t; |
| 659 | // PPC:typedef int8_t int_fast8_t; |
| 660 | // PPC:typedef uint8_t uint_fast8_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 661 | // |
Ken Dyck | 08321b4 | 2009-11-18 20:24:13 +0000 | [diff] [blame] | 662 | // PPC:typedef int32_t intptr_t; |
| 663 | // PPC:typedef uint32_t uintptr_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 664 | // |
Daniel Dunbar | 96d38c1 | 2010-06-30 06:30:50 +0000 | [diff] [blame] | 665 | // PPC:typedef long long int intmax_t; |
| 666 | // PPC:typedef long long unsigned int uintmax_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 667 | // |
| 668 | // PPC:INT8_MAX_ 127 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 669 | // PPC:INT8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 670 | // PPC:UINT8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 671 | // PPC:INT_LEAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 672 | // PPC:INT_LEAST8_MAX_ 127 |
| 673 | // PPC:UINT_LEAST8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 674 | // PPC:INT_FAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 675 | // PPC:INT_FAST8_MAX_ 127 |
| 676 | // PPC:UINT_FAST8_MAX_ 255 |
| 677 | // |
| 678 | // PPC:INT16_MAX_ 32767 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 679 | // PPC:INT16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 680 | // PPC:UINT16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 681 | // PPC:INT_LEAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 682 | // PPC:INT_LEAST16_MAX_ 32767 |
| 683 | // PPC:UINT_LEAST16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 684 | // PPC:INT_FAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 685 | // PPC:INT_FAST16_MAX_ 32767 |
| 686 | // PPC:UINT_FAST16_MAX_ 65535 |
| 687 | // |
| 688 | // PPC:INT32_MAX_ 2147483647 |
| 689 | // PPC:INT32_MIN_ (-2147483647 -1) |
| 690 | // PPC:UINT32_MAX_ 4294967295U |
| 691 | // PPC:INT_LEAST32_MIN_ (-2147483647 -1) |
| 692 | // PPC:INT_LEAST32_MAX_ 2147483647 |
| 693 | // PPC:UINT_LEAST32_MAX_ 4294967295U |
| 694 | // PPC:INT_FAST32_MIN_ (-2147483647 -1) |
| 695 | // PPC:INT_FAST32_MAX_ 2147483647 |
| 696 | // PPC:UINT_FAST32_MAX_ 4294967295U |
| 697 | // |
| 698 | // PPC:INT64_MAX_ 9223372036854775807LL |
| 699 | // PPC:INT64_MIN_ (-9223372036854775807LL -1) |
| 700 | // PPC:UINT64_MAX_ 18446744073709551615ULL |
| 701 | // PPC:INT_LEAST64_MIN_ (-9223372036854775807LL -1) |
| 702 | // PPC:INT_LEAST64_MAX_ 9223372036854775807LL |
| 703 | // PPC:UINT_LEAST64_MAX_ 18446744073709551615ULL |
| 704 | // PPC:INT_FAST64_MIN_ (-9223372036854775807LL -1) |
| 705 | // PPC:INT_FAST64_MAX_ 9223372036854775807LL |
| 706 | // PPC:UINT_FAST64_MAX_ 18446744073709551615ULL |
| 707 | // |
| 708 | // PPC:INTPTR_MIN_ (-2147483647 -1) |
| 709 | // PPC:INTPTR_MAX_ 2147483647 |
| 710 | // PPC:UINTPTR_MAX_ 4294967295U |
| 711 | // PPC:PTRDIFF_MIN_ (-2147483647 -1) |
| 712 | // PPC:PTRDIFF_MAX_ 2147483647 |
| 713 | // PPC:SIZE_MAX_ 4294967295U |
| 714 | // |
| 715 | // PPC:INTMAX_MIN_ (-9223372036854775807LL -1) |
| 716 | // PPC:INTMAX_MAX_ 9223372036854775807LL |
Ken Dyck | db57ce5 | 2009-11-18 19:22:15 +0000 | [diff] [blame] | 717 | // PPC:UINTMAX_MAX_ 18446744073709551615ULL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 718 | // |
| 719 | // PPC:SIG_ATOMIC_MIN_ (-2147483647 -1) |
| 720 | // PPC:SIG_ATOMIC_MAX_ 2147483647 |
| 721 | // PPC:WINT_MIN_ (-2147483647 -1) |
| 722 | // PPC:WINT_MAX_ 2147483647 |
| 723 | // |
| 724 | // PPC:WCHAR_MAX_ 2147483647 |
| 725 | // PPC:WCHAR_MIN_ (-2147483647 -1) |
| 726 | // |
Ken Dyck | 6ab25f4 | 2009-11-17 13:54:02 +0000 | [diff] [blame] | 727 | // PPC:INT8_C_(0) 0 |
| 728 | // PPC:UINT8_C_(0) 0U |
| 729 | // PPC:INT16_C_(0) 0 |
| 730 | // PPC:UINT16_C_(0) 0U |
| 731 | // PPC:INT32_C_(0) 0 |
| 732 | // PPC:UINT32_C_(0) 0U |
| 733 | // PPC:INT64_C_(0) 0LL |
| 734 | // PPC:UINT64_C_(0) 0ULL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 735 | // |
Ken Dyck | 6ab25f4 | 2009-11-17 13:54:02 +0000 | [diff] [blame] | 736 | // PPC:INTMAX_C_(0) 0LL |
| 737 | // PPC:UINTMAX_C_(0) 0ULL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 738 | // |
Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 739 | // 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] | 740 | // |
Daniel Dunbar | 7f3a545 | 2010-06-30 06:30:56 +0000 | [diff] [blame] | 741 | // S390X:typedef signed long long int int64_t; |
| 742 | // S390X:typedef unsigned long long int uint64_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 743 | // S390X:typedef int64_t int_least64_t; |
| 744 | // S390X:typedef uint64_t uint_least64_t; |
| 745 | // S390X:typedef int64_t int_fast64_t; |
| 746 | // S390X:typedef uint64_t uint_fast64_t; |
Chris 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 | // S390X:typedef signed int int32_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 749 | // S390X:typedef unsigned int uint32_t; |
| 750 | // S390X:typedef int32_t int_least32_t; |
| 751 | // S390X:typedef uint32_t uint_least32_t; |
| 752 | // S390X:typedef int32_t int_fast32_t; |
| 753 | // S390X:typedef uint32_t uint_fast32_t; |
| 754 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 755 | // S390X:typedef signed short int16_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 756 | // S390X:typedef unsigned short uint16_t; |
| 757 | // S390X:typedef int16_t int_least16_t; |
| 758 | // S390X:typedef uint16_t uint_least16_t; |
| 759 | // S390X:typedef int16_t int_fast16_t; |
| 760 | // S390X:typedef uint16_t uint_fast16_t; |
| 761 | // |
| 762 | // S390X:typedef signed char int8_t; |
| 763 | // S390X:typedef unsigned char uint8_t; |
| 764 | // S390X:typedef int8_t int_least8_t; |
| 765 | // S390X:typedef uint8_t uint_least8_t; |
| 766 | // S390X:typedef int8_t int_fast8_t; |
| 767 | // S390X:typedef uint8_t uint_fast8_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 768 | // |
Ken Dyck | 08321b4 | 2009-11-18 20:24:13 +0000 | [diff] [blame] | 769 | // S390X:typedef int64_t intptr_t; |
| 770 | // S390X:typedef uint64_t uintptr_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 771 | // |
Daniel Dunbar | 96d38c1 | 2010-06-30 06:30:50 +0000 | [diff] [blame] | 772 | // S390X:typedef long long int intmax_t; |
| 773 | // S390X:typedef long long unsigned int uintmax_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 774 | // |
| 775 | // S390X:INT8_MAX_ 127 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 776 | // S390X:INT8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 777 | // S390X:UINT8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 778 | // S390X:INT_LEAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 779 | // S390X:INT_LEAST8_MAX_ 127 |
| 780 | // S390X:UINT_LEAST8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 781 | // S390X:INT_FAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 782 | // S390X:INT_FAST8_MAX_ 127 |
| 783 | // S390X:UINT_FAST8_MAX_ 255 |
| 784 | // |
| 785 | // S390X:INT16_MAX_ 32767 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 786 | // S390X:INT16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 787 | // S390X:UINT16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 788 | // S390X:INT_LEAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 789 | // S390X:INT_LEAST16_MAX_ 32767 |
| 790 | // S390X:UINT_LEAST16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 791 | // S390X:INT_FAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 792 | // S390X:INT_FAST16_MAX_ 32767 |
| 793 | // S390X:UINT_FAST16_MAX_ 65535 |
| 794 | // |
| 795 | // S390X:INT32_MAX_ 2147483647 |
| 796 | // S390X:INT32_MIN_ (-2147483647 -1) |
| 797 | // S390X:UINT32_MAX_ 4294967295U |
| 798 | // S390X:INT_LEAST32_MIN_ (-2147483647 -1) |
| 799 | // S390X:INT_LEAST32_MAX_ 2147483647 |
| 800 | // S390X:UINT_LEAST32_MAX_ 4294967295U |
| 801 | // S390X:INT_FAST32_MIN_ (-2147483647 -1) |
| 802 | // S390X:INT_FAST32_MAX_ 2147483647 |
| 803 | // S390X:UINT_FAST32_MAX_ 4294967295U |
| 804 | // |
Ken Dyck | 8163841 | 2009-11-17 16:26:27 +0000 | [diff] [blame] | 805 | // S390X:INT64_MAX_ 9223372036854775807L |
Daniel Dunbar | 7f3a545 | 2010-06-30 06:30:56 +0000 | [diff] [blame] | 806 | // S390X:INT64_MIN_ (-9223372036854775807LL -1) |
Ken Dyck | 8163841 | 2009-11-17 16:26:27 +0000 | [diff] [blame] | 807 | // S390X:UINT64_MAX_ 18446744073709551615UL |
Daniel Dunbar | 7f3a545 | 2010-06-30 06:30:56 +0000 | [diff] [blame] | 808 | // S390X:INT_LEAST64_MIN_ (-9223372036854775807LL -1) |
Ken Dyck | 8163841 | 2009-11-17 16:26:27 +0000 | [diff] [blame] | 809 | // S390X:INT_LEAST64_MAX_ 9223372036854775807L |
| 810 | // S390X:UINT_LEAST64_MAX_ 18446744073709551615UL |
Daniel Dunbar | 7f3a545 | 2010-06-30 06:30:56 +0000 | [diff] [blame] | 811 | // S390X:INT_FAST64_MIN_ (-9223372036854775807LL -1) |
Ken Dyck | 8163841 | 2009-11-17 16:26:27 +0000 | [diff] [blame] | 812 | // S390X:INT_FAST64_MAX_ 9223372036854775807L |
| 813 | // S390X:UINT_FAST64_MAX_ 18446744073709551615UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 814 | // |
Daniel Dunbar | 7f3a545 | 2010-06-30 06:30:56 +0000 | [diff] [blame] | 815 | // S390X:INTPTR_MIN_ (-9223372036854775807LL -1) |
Ken Dyck | 8163841 | 2009-11-17 16:26:27 +0000 | [diff] [blame] | 816 | // S390X:INTPTR_MAX_ 9223372036854775807L |
| 817 | // S390X:UINTPTR_MAX_ 18446744073709551615UL |
Daniel Dunbar | 7f3a545 | 2010-06-30 06:30:56 +0000 | [diff] [blame] | 818 | // S390X:PTRDIFF_MIN_ (-9223372036854775807LL -1) |
Ken Dyck | 8163841 | 2009-11-17 16:26:27 +0000 | [diff] [blame] | 819 | // S390X:PTRDIFF_MAX_ 9223372036854775807L |
| 820 | // S390X:SIZE_MAX_ 18446744073709551615UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 821 | // |
Daniel Dunbar | 7f3a545 | 2010-06-30 06:30:56 +0000 | [diff] [blame] | 822 | // S390X:INTMAX_MIN_ (-9223372036854775807LL -1) |
Ken Dyck | db57ce5 | 2009-11-18 19:22:15 +0000 | [diff] [blame] | 823 | // S390X:INTMAX_MAX_ 9223372036854775807L |
| 824 | // S390X:UINTMAX_MAX_ 18446744073709551615UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 825 | // |
| 826 | // S390X:SIG_ATOMIC_MIN_ (-2147483647 -1) |
| 827 | // S390X:SIG_ATOMIC_MAX_ 2147483647 |
| 828 | // S390X:WINT_MIN_ (-2147483647 -1) |
| 829 | // S390X:WINT_MAX_ 2147483647 |
| 830 | // |
| 831 | // S390X:WCHAR_MAX_ 2147483647 |
| 832 | // S390X:WCHAR_MIN_ (-2147483647 -1) |
| 833 | // |
Ken Dyck | 6ab25f4 | 2009-11-17 13:54:02 +0000 | [diff] [blame] | 834 | // S390X:INT8_C_(0) 0 |
| 835 | // S390X:UINT8_C_(0) 0U |
| 836 | // S390X:INT16_C_(0) 0 |
| 837 | // S390X:UINT16_C_(0) 0U |
| 838 | // S390X:INT32_C_(0) 0 |
| 839 | // S390X:UINT32_C_(0) 0U |
| 840 | // S390X:INT64_C_(0) 0L |
| 841 | // S390X:UINT64_C_(0) 0UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 842 | // |
Ken Dyck | 832b710 | 2009-11-18 19:42:57 +0000 | [diff] [blame] | 843 | // S390X:INTMAX_C_(0) 0L |
| 844 | // S390X:UINTMAX_C_(0) 0UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 845 | // |
Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 846 | // 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] | 847 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 848 | // SPARC:typedef signed long long int int64_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 849 | // SPARC:typedef unsigned long long int uint64_t; |
| 850 | // SPARC:typedef int64_t int_least64_t; |
| 851 | // SPARC:typedef uint64_t uint_least64_t; |
| 852 | // SPARC:typedef int64_t int_fast64_t; |
| 853 | // SPARC:typedef uint64_t uint_fast64_t; |
Chris 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 | // SPARC:typedef signed int int32_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 856 | // SPARC:typedef unsigned int uint32_t; |
| 857 | // SPARC:typedef int32_t int_least32_t; |
| 858 | // SPARC:typedef uint32_t uint_least32_t; |
| 859 | // SPARC:typedef int32_t int_fast32_t; |
| 860 | // SPARC:typedef uint32_t uint_fast32_t; |
| 861 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 862 | // SPARC:typedef signed short int16_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 863 | // SPARC:typedef unsigned short uint16_t; |
| 864 | // SPARC:typedef int16_t int_least16_t; |
| 865 | // SPARC:typedef uint16_t uint_least16_t; |
| 866 | // SPARC:typedef int16_t int_fast16_t; |
| 867 | // SPARC:typedef uint16_t uint_fast16_t; |
| 868 | // |
| 869 | // SPARC:typedef signed char int8_t; |
| 870 | // SPARC:typedef unsigned char uint8_t; |
| 871 | // SPARC:typedef int8_t int_least8_t; |
| 872 | // SPARC:typedef uint8_t uint_least8_t; |
| 873 | // SPARC:typedef int8_t int_fast8_t; |
| 874 | // SPARC:typedef uint8_t uint_fast8_t; |
Chris 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 | // SPARC:typedef int32_t intptr_t; |
| 877 | // SPARC: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 | // SPARC:typedef long long int intmax_t; |
| 880 | // SPARC:typedef long long unsigned int uintmax_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 881 | // |
| 882 | // SPARC:INT8_MAX_ 127 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 883 | // SPARC:INT8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 884 | // SPARC:UINT8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 885 | // SPARC:INT_LEAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 886 | // SPARC:INT_LEAST8_MAX_ 127 |
| 887 | // SPARC:UINT_LEAST8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 888 | // SPARC:INT_FAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 889 | // SPARC:INT_FAST8_MAX_ 127 |
| 890 | // SPARC:UINT_FAST8_MAX_ 255 |
| 891 | // |
| 892 | // SPARC:INT16_MAX_ 32767 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 893 | // SPARC:INT16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 894 | // SPARC:UINT16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 895 | // SPARC:INT_LEAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 896 | // SPARC:INT_LEAST16_MAX_ 32767 |
| 897 | // SPARC:UINT_LEAST16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 898 | // SPARC:INT_FAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 899 | // SPARC:INT_FAST16_MAX_ 32767 |
| 900 | // SPARC:UINT_FAST16_MAX_ 65535 |
| 901 | // |
| 902 | // SPARC:INT32_MAX_ 2147483647 |
| 903 | // SPARC:INT32_MIN_ (-2147483647 -1) |
| 904 | // SPARC:UINT32_MAX_ 4294967295U |
| 905 | // SPARC:INT_LEAST32_MIN_ (-2147483647 -1) |
| 906 | // SPARC:INT_LEAST32_MAX_ 2147483647 |
| 907 | // SPARC:UINT_LEAST32_MAX_ 4294967295U |
| 908 | // SPARC:INT_FAST32_MIN_ (-2147483647 -1) |
| 909 | // SPARC:INT_FAST32_MAX_ 2147483647 |
| 910 | // SPARC:UINT_FAST32_MAX_ 4294967295U |
| 911 | // |
| 912 | // SPARC:INT64_MAX_ 9223372036854775807LL |
| 913 | // SPARC:INT64_MIN_ (-9223372036854775807LL -1) |
| 914 | // SPARC:UINT64_MAX_ 18446744073709551615ULL |
| 915 | // SPARC:INT_LEAST64_MIN_ (-9223372036854775807LL -1) |
| 916 | // SPARC:INT_LEAST64_MAX_ 9223372036854775807LL |
| 917 | // SPARC:UINT_LEAST64_MAX_ 18446744073709551615ULL |
| 918 | // SPARC:INT_FAST64_MIN_ (-9223372036854775807LL -1) |
| 919 | // SPARC:INT_FAST64_MAX_ 9223372036854775807LL |
| 920 | // SPARC:UINT_FAST64_MAX_ 18446744073709551615ULL |
| 921 | // |
| 922 | // SPARC:INTPTR_MIN_ (-2147483647 -1) |
| 923 | // SPARC:INTPTR_MAX_ 2147483647 |
| 924 | // SPARC:UINTPTR_MAX_ 4294967295U |
| 925 | // SPARC:PTRDIFF_MIN_ (-2147483647 -1) |
| 926 | // SPARC:PTRDIFF_MAX_ 2147483647 |
| 927 | // SPARC:SIZE_MAX_ 4294967295U |
| 928 | // |
| 929 | // SPARC:INTMAX_MIN_ (-9223372036854775807LL -1) |
| 930 | // SPARC:INTMAX_MAX_ 9223372036854775807LL |
Ken Dyck | db57ce5 | 2009-11-18 19:22:15 +0000 | [diff] [blame] | 931 | // SPARC:UINTMAX_MAX_ 18446744073709551615ULL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 932 | // |
| 933 | // SPARC:SIG_ATOMIC_MIN_ (-2147483647 -1) |
| 934 | // SPARC:SIG_ATOMIC_MAX_ 2147483647 |
| 935 | // SPARC:WINT_MIN_ (-2147483647 -1) |
| 936 | // SPARC:WINT_MAX_ 2147483647 |
| 937 | // |
| 938 | // SPARC:WCHAR_MAX_ 2147483647 |
| 939 | // SPARC:WCHAR_MIN_ (-2147483647 -1) |
| 940 | // |
Ken Dyck | 6ab25f4 | 2009-11-17 13:54:02 +0000 | [diff] [blame] | 941 | // SPARC:INT8_C_(0) 0 |
| 942 | // SPARC:UINT8_C_(0) 0U |
| 943 | // SPARC:INT16_C_(0) 0 |
| 944 | // SPARC:UINT16_C_(0) 0U |
| 945 | // SPARC:INT32_C_(0) 0 |
| 946 | // SPARC:UINT32_C_(0) 0U |
| 947 | // SPARC:INT64_C_(0) 0LL |
| 948 | // SPARC:UINT64_C_(0) 0ULL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 949 | // |
Ken Dyck | 6ab25f4 | 2009-11-17 13:54:02 +0000 | [diff] [blame] | 950 | // SPARC:INTMAX_C_(0) 0LL |
| 951 | // SPARC:UINTMAX_C_(0) 0ULL |
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=tce-none-none %s | FileCheck -check-prefix TCE %s |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 954 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 955 | // TCE:typedef signed int int32_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 956 | // TCE:typedef unsigned int uint32_t; |
| 957 | // TCE:typedef int32_t int_least32_t; |
| 958 | // TCE:typedef uint32_t uint_least32_t; |
| 959 | // TCE:typedef int32_t int_fast32_t; |
| 960 | // TCE:typedef uint32_t uint_fast32_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 961 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 962 | // TCE:typedef signed short int16_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 963 | // TCE:typedef unsigned short uint16_t; |
| 964 | // TCE:typedef int16_t int_least16_t; |
| 965 | // TCE:typedef uint16_t uint_least16_t; |
| 966 | // TCE:typedef int16_t int_fast16_t; |
| 967 | // TCE:typedef uint16_t uint_fast16_t; |
| 968 | // |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 969 | // TCE:typedef signed char int8_t; |
| 970 | // TCE:typedef unsigned char uint8_t; |
| 971 | // TCE:typedef int8_t int_least8_t; |
| 972 | // TCE:typedef uint8_t uint_least8_t; |
| 973 | // TCE:typedef int8_t int_fast8_t; |
| 974 | // TCE:typedef uint8_t uint_fast8_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 975 | // |
Ken Dyck | 08321b4 | 2009-11-18 20:24:13 +0000 | [diff] [blame] | 976 | // TCE:typedef int32_t intptr_t; |
| 977 | // TCE:typedef uint32_t uintptr_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 978 | // |
Daniel Dunbar | 96d38c1 | 2010-06-30 06:30:50 +0000 | [diff] [blame] | 979 | // TCE:typedef long int intmax_t; |
| 980 | // TCE:typedef long unsigned int uintmax_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 981 | // |
| 982 | // TCE:INT8_MAX_ 127 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 983 | // TCE:INT8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 984 | // TCE:UINT8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 985 | // TCE:INT_LEAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 986 | // TCE:INT_LEAST8_MAX_ 127 |
| 987 | // TCE:UINT_LEAST8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 988 | // TCE:INT_FAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 989 | // TCE:INT_FAST8_MAX_ 127 |
| 990 | // TCE:UINT_FAST8_MAX_ 255 |
| 991 | // |
| 992 | // TCE:INT16_MAX_ 32767 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 993 | // TCE:INT16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 994 | // TCE:UINT16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 995 | // TCE:INT_LEAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 996 | // TCE:INT_LEAST16_MAX_ 32767 |
| 997 | // TCE:UINT_LEAST16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 998 | // TCE:INT_FAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 999 | // TCE:INT_FAST16_MAX_ 32767 |
| 1000 | // TCE:UINT_FAST16_MAX_ 65535 |
| 1001 | // |
| 1002 | // TCE:INT32_MAX_ 2147483647 |
| 1003 | // TCE:INT32_MIN_ (-2147483647 -1) |
| 1004 | // TCE:UINT32_MAX_ 4294967295U |
| 1005 | // TCE:INT_LEAST32_MIN_ (-2147483647 -1) |
| 1006 | // TCE:INT_LEAST32_MAX_ 2147483647 |
| 1007 | // TCE:UINT_LEAST32_MAX_ 4294967295U |
| 1008 | // TCE:INT_FAST32_MIN_ (-2147483647 -1) |
| 1009 | // TCE:INT_FAST32_MAX_ 2147483647 |
| 1010 | // TCE:UINT_FAST32_MAX_ 4294967295U |
| 1011 | // |
| 1012 | // TCE:INT64_MAX_ INT64_MAX |
| 1013 | // TCE:INT64_MIN_ INT64_MIN |
| 1014 | // TCE:UINT64_MAX_ UINT64_MAX |
| 1015 | // TCE:INT_LEAST64_MIN_ INT_LEAST64_MIN |
| 1016 | // TCE:INT_LEAST64_MAX_ INT_LEAST64_MAX |
| 1017 | // TCE:UINT_LEAST64_MAX_ UINT_LEAST64_MAX |
| 1018 | // TCE:INT_FAST64_MIN_ INT_FAST64_MIN |
| 1019 | // TCE:INT_FAST64_MAX_ INT_FAST64_MAX |
| 1020 | // TCE:UINT_FAST64_MAX_ UINT_FAST64_MAX |
| 1021 | // |
| 1022 | // TCE:INTPTR_MIN_ (-2147483647 -1) |
| 1023 | // TCE:INTPTR_MAX_ 2147483647 |
| 1024 | // TCE:UINTPTR_MAX_ 4294967295U |
| 1025 | // TCE:PTRDIFF_MIN_ (-2147483647 -1) |
| 1026 | // TCE:PTRDIFF_MAX_ 2147483647 |
| 1027 | // TCE:SIZE_MAX_ 4294967295U |
| 1028 | // |
Ken Dyck | db57ce5 | 2009-11-18 19:22:15 +0000 | [diff] [blame] | 1029 | // TCE:INTMAX_MIN_ (-2147483647 -1) |
| 1030 | // TCE:INTMAX_MAX_ 2147483647 |
| 1031 | // TCE:UINTMAX_MAX_ 4294967295U |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1032 | // |
| 1033 | // TCE:SIG_ATOMIC_MIN_ (-2147483647 -1) |
| 1034 | // TCE:SIG_ATOMIC_MAX_ 2147483647 |
| 1035 | // TCE:WINT_MIN_ (-2147483647 -1) |
| 1036 | // TCE:WINT_MAX_ 2147483647 |
| 1037 | // |
| 1038 | // TCE:WCHAR_MAX_ 2147483647 |
| 1039 | // TCE:WCHAR_MIN_ (-2147483647 -1) |
| 1040 | // |
Ken Dyck | 6ab25f4 | 2009-11-17 13:54:02 +0000 | [diff] [blame] | 1041 | // TCE:INT8_C_(0) 0 |
| 1042 | // TCE:UINT8_C_(0) 0U |
| 1043 | // TCE:INT16_C_(0) 0 |
| 1044 | // TCE:UINT16_C_(0) 0U |
| 1045 | // TCE:INT32_C_(0) 0 |
| 1046 | // TCE:UINT32_C_(0) 0U |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1047 | // TCE:INT64_C_(0) INT64_C(0) |
| 1048 | // TCE:UINT64_C_(0) UINT64_C(0) |
| 1049 | // |
Ken Dyck | 832b710 | 2009-11-18 19:42:57 +0000 | [diff] [blame] | 1050 | // TCE:INTMAX_C_(0) 0 |
| 1051 | // TCE:UINTMAX_C_(0) 0U |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1052 | // |
Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1053 | // 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] | 1054 | // |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 1055 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 1056 | // X86_64:typedef signed long int int64_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 1057 | // X86_64:typedef unsigned long int uint64_t; |
| 1058 | // X86_64:typedef int64_t int_least64_t; |
| 1059 | // X86_64:typedef uint64_t uint_least64_t; |
| 1060 | // X86_64:typedef int64_t int_fast64_t; |
| 1061 | // X86_64:typedef uint64_t uint_fast64_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1062 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 1063 | // X86_64:typedef signed int int32_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1064 | // X86_64:typedef unsigned int uint32_t; |
| 1065 | // X86_64:typedef int32_t int_least32_t; |
| 1066 | // X86_64:typedef uint32_t uint_least32_t; |
| 1067 | // X86_64:typedef int32_t int_fast32_t; |
| 1068 | // X86_64:typedef uint32_t uint_fast32_t; |
| 1069 | // |
Chris Lattner | dcdd2a0 | 2009-11-12 08:08:27 +0000 | [diff] [blame] | 1070 | // X86_64:typedef signed short int16_t; |
Chris Lattner | 06dcf6b | 2009-11-04 23:03:18 +0000 | [diff] [blame] | 1071 | // X86_64:typedef unsigned short uint16_t; |
| 1072 | // X86_64:typedef int16_t int_least16_t; |
| 1073 | // X86_64:typedef uint16_t uint_least16_t; |
| 1074 | // X86_64:typedef int16_t int_fast16_t; |
| 1075 | // X86_64:typedef uint16_t uint_fast16_t; |
| 1076 | // |
| 1077 | // X86_64:typedef signed char int8_t; |
| 1078 | // X86_64:typedef unsigned char uint8_t; |
| 1079 | // X86_64:typedef int8_t int_least8_t; |
| 1080 | // X86_64:typedef uint8_t uint_least8_t; |
| 1081 | // X86_64:typedef int8_t int_fast8_t; |
| 1082 | // X86_64:typedef uint8_t uint_fast8_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1083 | // |
Ken Dyck | 08321b4 | 2009-11-18 20:24:13 +0000 | [diff] [blame] | 1084 | // X86_64:typedef int64_t intptr_t; |
| 1085 | // X86_64:typedef uint64_t uintptr_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1086 | // |
Daniel Dunbar | 96d38c1 | 2010-06-30 06:30:50 +0000 | [diff] [blame] | 1087 | // X86_64:typedef long int intmax_t; |
| 1088 | // X86_64:typedef long unsigned int uintmax_t; |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1089 | // |
| 1090 | // X86_64:INT8_MAX_ 127 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 1091 | // X86_64:INT8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1092 | // X86_64:UINT8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 1093 | // X86_64:INT_LEAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1094 | // X86_64:INT_LEAST8_MAX_ 127 |
| 1095 | // X86_64:UINT_LEAST8_MAX_ 255 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 1096 | // X86_64:INT_FAST8_MIN_ (-127 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1097 | // X86_64:INT_FAST8_MAX_ 127 |
| 1098 | // X86_64:UINT_FAST8_MAX_ 255 |
| 1099 | // |
| 1100 | // X86_64:INT16_MAX_ 32767 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 1101 | // X86_64:INT16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1102 | // X86_64:UINT16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 1103 | // X86_64:INT_LEAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1104 | // X86_64:INT_LEAST16_MAX_ 32767 |
| 1105 | // X86_64:UINT_LEAST16_MAX_ 65535 |
Ken Dyck | b088756 | 2009-11-17 18:29:12 +0000 | [diff] [blame] | 1106 | // X86_64:INT_FAST16_MIN_ (-32767 -1) |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1107 | // X86_64:INT_FAST16_MAX_ 32767 |
| 1108 | // X86_64:UINT_FAST16_MAX_ 65535 |
| 1109 | // |
| 1110 | // X86_64:INT32_MAX_ 2147483647 |
| 1111 | // X86_64:INT32_MIN_ (-2147483647 -1) |
| 1112 | // X86_64:UINT32_MAX_ 4294967295U |
| 1113 | // X86_64:INT_LEAST32_MIN_ (-2147483647 -1) |
| 1114 | // X86_64:INT_LEAST32_MAX_ 2147483647 |
| 1115 | // X86_64:UINT_LEAST32_MAX_ 4294967295U |
| 1116 | // X86_64:INT_FAST32_MIN_ (-2147483647 -1) |
| 1117 | // X86_64:INT_FAST32_MAX_ 2147483647 |
| 1118 | // X86_64:UINT_FAST32_MAX_ 4294967295U |
| 1119 | // |
Ken Dyck | 8163841 | 2009-11-17 16:26:27 +0000 | [diff] [blame] | 1120 | // X86_64:INT64_MAX_ 9223372036854775807L |
| 1121 | // X86_64:INT64_MIN_ (-9223372036854775807L -1) |
| 1122 | // X86_64:UINT64_MAX_ 18446744073709551615UL |
| 1123 | // X86_64:INT_LEAST64_MIN_ (-9223372036854775807L -1) |
| 1124 | // X86_64:INT_LEAST64_MAX_ 9223372036854775807L |
| 1125 | // X86_64:UINT_LEAST64_MAX_ 18446744073709551615UL |
| 1126 | // X86_64:INT_FAST64_MIN_ (-9223372036854775807L -1) |
| 1127 | // X86_64:INT_FAST64_MAX_ 9223372036854775807L |
| 1128 | // X86_64:UINT_FAST64_MAX_ 18446744073709551615UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1129 | // |
Ken Dyck | 8163841 | 2009-11-17 16:26:27 +0000 | [diff] [blame] | 1130 | // X86_64:INTPTR_MIN_ (-9223372036854775807L -1) |
| 1131 | // X86_64:INTPTR_MAX_ 9223372036854775807L |
| 1132 | // X86_64:UINTPTR_MAX_ 18446744073709551615UL |
| 1133 | // X86_64:PTRDIFF_MIN_ (-9223372036854775807L -1) |
| 1134 | // X86_64:PTRDIFF_MAX_ 9223372036854775807L |
| 1135 | // X86_64:SIZE_MAX_ 18446744073709551615UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1136 | // |
| 1137 | // X86_64:INTMAX_MIN_ (-9223372036854775807L -1) |
| 1138 | // X86_64:INTMAX_MAX_ 9223372036854775807L |
Ken Dyck | db57ce5 | 2009-11-18 19:22:15 +0000 | [diff] [blame] | 1139 | // X86_64:UINTMAX_MAX_ 18446744073709551615UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1140 | // |
| 1141 | // X86_64:SIG_ATOMIC_MIN_ (-2147483647 -1) |
| 1142 | // X86_64:SIG_ATOMIC_MAX_ 2147483647 |
| 1143 | // X86_64:WINT_MIN_ (-2147483647 -1) |
| 1144 | // X86_64:WINT_MAX_ 2147483647 |
| 1145 | // |
| 1146 | // X86_64:WCHAR_MAX_ 2147483647 |
| 1147 | // X86_64:WCHAR_MIN_ (-2147483647 -1) |
| 1148 | // |
Ken Dyck | 6ab25f4 | 2009-11-17 13:54:02 +0000 | [diff] [blame] | 1149 | // X86_64:INT8_C_(0) 0 |
| 1150 | // X86_64:UINT8_C_(0) 0U |
| 1151 | // X86_64:INT16_C_(0) 0 |
| 1152 | // X86_64:UINT16_C_(0) 0U |
| 1153 | // X86_64:INT32_C_(0) 0 |
| 1154 | // X86_64:UINT32_C_(0) 0U |
| 1155 | // X86_64:INT64_C_(0) 0L |
| 1156 | // X86_64:UINT64_C_(0) 0UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1157 | // |
Ken Dyck | 832b710 | 2009-11-18 19:42:57 +0000 | [diff] [blame] | 1158 | // X86_64:INTMAX_C_(0) 0L |
| 1159 | // X86_64:UINTMAX_C_(0) 0UL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1160 | // |
Ken Dyck | aface1b | 2009-11-20 16:37:35 +0000 | [diff] [blame] | 1161 | // |
| 1162 | // stdint.h forms several macro definitions by pasting together identifiers |
| 1163 | // to form names (eg. int32_t is formed from int ## 32 ## _t). The following |
| 1164 | // case tests that these joining operations are performed correctly even if |
| 1165 | // the identifiers used in the operations (int, uint, _t, INT, UINT, _MIN, |
| 1166 | // _MAX, and _C(v)) are themselves macros. |
| 1167 | // |
Daniel Dunbar | 96d38c1 | 2010-06-30 06:30:50 +0000 | [diff] [blame] | 1168 | // 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] | 1169 | // JOIN:typedef int32_t intptr_t; |
| 1170 | // JOIN:typedef uint32_t uintptr_t; |
Daniel Dunbar | 96d38c1 | 2010-06-30 06:30:50 +0000 | [diff] [blame] | 1171 | // JOIN:typedef __INTMAX_TYPE__ intmax_t; |
| 1172 | // JOIN:typedef __UINTMAX_TYPE__ uintmax_t; |
Ken Dyck | a2e9284 | 2009-11-20 16:44:38 +0000 | [diff] [blame] | 1173 | // JOIN:INTPTR_MIN_ (-2147483647 -1) |
| 1174 | // JOIN:INTPTR_MAX_ 2147483647 |
| 1175 | // JOIN:UINTPTR_MAX_ 4294967295U |
| 1176 | // JOIN:PTRDIFF_MIN_ (-2147483647 -1) |
| 1177 | // JOIN:PTRDIFF_MAX_ 2147483647 |
| 1178 | // JOIN:SIZE_MAX_ 4294967295U |
| 1179 | // JOIN:INTMAX_MIN_ (-9223372036854775807LL -1) |
| 1180 | // JOIN:INTMAX_MAX_ 9223372036854775807LL |
| 1181 | // JOIN:UINTMAX_MAX_ 18446744073709551615ULL |
| 1182 | // JOIN:SIG_ATOMIC_MIN_ (-2147483647 -1) |
| 1183 | // JOIN:SIG_ATOMIC_MAX_ 2147483647 |
| 1184 | // JOIN:WINT_MIN_ (-2147483647 -1) |
| 1185 | // JOIN:WINT_MAX_ 2147483647 |
| 1186 | // JOIN:WCHAR_MAX_ 2147483647 |
| 1187 | // JOIN:WCHAR_MIN_ (-2147483647 -1) |
Ken Dyck | fdb4324 | 2009-11-20 16:49:10 +0000 | [diff] [blame] | 1188 | // JOIN:INTMAX_C_(0) 0LL |
| 1189 | // JOIN:UINTMAX_C_(0) 0ULL |
Chris Lattner | bceaf86 | 2009-10-29 04:55:36 +0000 | [diff] [blame] | 1190 | |
| 1191 | #include <stdint.h> |
| 1192 | |
| 1193 | INT8_MAX_ INT8_MAX |
| 1194 | INT8_MIN_ INT8_MIN |
| 1195 | UINT8_MAX_ UINT8_MAX |
| 1196 | INT_LEAST8_MIN_ INT_LEAST8_MIN |
| 1197 | INT_LEAST8_MAX_ INT_LEAST8_MAX |
| 1198 | UINT_LEAST8_MAX_ UINT_LEAST8_MAX |
| 1199 | INT_FAST8_MIN_ INT_FAST8_MIN |
| 1200 | INT_FAST8_MAX_ INT_FAST8_MAX |
| 1201 | UINT_FAST8_MAX_ UINT_FAST8_MAX |
| 1202 | |
| 1203 | INT16_MAX_ INT16_MAX |
| 1204 | INT16_MIN_ INT16_MIN |
| 1205 | UINT16_MAX_ UINT16_MAX |
| 1206 | INT_LEAST16_MIN_ INT_LEAST16_MIN |
| 1207 | INT_LEAST16_MAX_ INT_LEAST16_MAX |
| 1208 | UINT_LEAST16_MAX_ UINT_LEAST16_MAX |
| 1209 | INT_FAST16_MIN_ INT_FAST16_MIN |
| 1210 | INT_FAST16_MAX_ INT_FAST16_MAX |
| 1211 | UINT_FAST16_MAX_ UINT_FAST16_MAX |
| 1212 | |
| 1213 | INT32_MAX_ INT32_MAX |
| 1214 | INT32_MIN_ INT32_MIN |
| 1215 | UINT32_MAX_ UINT32_MAX |
| 1216 | INT_LEAST32_MIN_ INT_LEAST32_MIN |
| 1217 | INT_LEAST32_MAX_ INT_LEAST32_MAX |
| 1218 | UINT_LEAST32_MAX_ UINT_LEAST32_MAX |
| 1219 | INT_FAST32_MIN_ INT_FAST32_MIN |
| 1220 | INT_FAST32_MAX_ INT_FAST32_MAX |
| 1221 | UINT_FAST32_MAX_ UINT_FAST32_MAX |
| 1222 | |
| 1223 | INT64_MAX_ INT64_MAX |
| 1224 | INT64_MIN_ INT64_MIN |
| 1225 | UINT64_MAX_ UINT64_MAX |
| 1226 | INT_LEAST64_MIN_ INT_LEAST64_MIN |
| 1227 | INT_LEAST64_MAX_ INT_LEAST64_MAX |
| 1228 | UINT_LEAST64_MAX_ UINT_LEAST64_MAX |
| 1229 | INT_FAST64_MIN_ INT_FAST64_MIN |
| 1230 | INT_FAST64_MAX_ INT_FAST64_MAX |
| 1231 | UINT_FAST64_MAX_ UINT_FAST64_MAX |
| 1232 | |
| 1233 | INTPTR_MIN_ INTPTR_MIN |
| 1234 | INTPTR_MAX_ INTPTR_MAX |
| 1235 | UINTPTR_MAX_ UINTPTR_MAX |
| 1236 | PTRDIFF_MIN_ PTRDIFF_MIN |
| 1237 | PTRDIFF_MAX_ PTRDIFF_MAX |
| 1238 | SIZE_MAX_ SIZE_MAX |
| 1239 | |
| 1240 | INTMAX_MIN_ INTMAX_MIN |
| 1241 | INTMAX_MAX_ INTMAX_MAX |
| 1242 | UINTMAX_MAX_ UINTMAX_MAX |
| 1243 | |
| 1244 | SIG_ATOMIC_MIN_ SIG_ATOMIC_MIN |
| 1245 | SIG_ATOMIC_MAX_ SIG_ATOMIC_MAX |
| 1246 | WINT_MIN_ WINT_MIN |
| 1247 | WINT_MAX_ WINT_MAX |
| 1248 | |
| 1249 | WCHAR_MAX_ WCHAR_MAX |
| 1250 | WCHAR_MIN_ WCHAR_MIN |
| 1251 | |
| 1252 | INT8_C_(0) INT8_C(0) |
| 1253 | UINT8_C_(0) UINT8_C(0) |
| 1254 | INT16_C_(0) INT16_C(0) |
| 1255 | UINT16_C_(0) UINT16_C(0) |
| 1256 | INT32_C_(0) INT32_C(0) |
| 1257 | UINT32_C_(0) UINT32_C(0) |
| 1258 | INT64_C_(0) INT64_C(0) |
| 1259 | UINT64_C_(0) UINT64_C(0) |
| 1260 | |
| 1261 | INTMAX_C_(0) INTMAX_C(0) |
| 1262 | UINTMAX_C_(0) UINTMAX_C(0) |