John Stiles | b0d93cc | 2021-06-01 11:07:53 -0400 | [diff] [blame] | 1 | // Expect 10 errors |
| 2 | |
| 3 | const int intMin = -2147483648; |
| 4 | const int intMinMinusOne = -2147483649; // error |
| 5 | const int intMax = 2147483647; |
| 6 | const int intMaxPlusOne = 2147483648; // error |
John Stiles | 7601370 | 2020-11-10 14:17:42 -0500 | [diff] [blame] | 7 | |
| 8 | void main() { |
John Stiles | b0d93cc | 2021-06-01 11:07:53 -0400 | [diff] [blame] | 9 | ushort4 us4 = ushort4(-1, // error |
| 10 | 0, |
| 11 | 65535, |
| 12 | 65536); // error |
| 13 | |
| 14 | short4 s4 = short4(-32768, |
| 15 | -32769, // error |
| 16 | 32768, // error |
| 17 | 32767); |
| 18 | |
| 19 | int4 i4 = int4(intMin, |
| 20 | intMinMinusOne, // error |
| 21 | intMax, |
| 22 | intMaxPlusOne); // error |
| 23 | |
| 24 | uint4 ui4 = uint4(intMin, // error |
| 25 | intMinMinusOne, // error |
| 26 | intMax, |
| 27 | intMaxPlusOne); |
John Stiles | 7601370 | 2020-11-10 14:17:42 -0500 | [diff] [blame] | 28 | } |