diff options
Diffstat (limited to 'test/bounds.go')
-rw-r--r-- | test/bounds.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/bounds.go b/test/bounds.go index 4a9c3b2d39..aa1d51b6f9 100644 --- a/test/bounds.go +++ b/test/bounds.go @@ -209,6 +209,11 @@ func main() { use(a1k[i&^0]) use(a1k[i&^-2]) // ERROR "index bounds check elided" use(a1k[i&^1]) + use(a1k[i8&^0]) + use(a1k[i8&^-128]) // ERROR "index bounds check elided" + use(a1k[ui8&^1]) // ERROR "index bounds check elided" + use(a1k[ui16&^0xf000]) + use(a1k[ui16&^0xff00]) // ERROR "index bounds check elided" // Right shift cuts the effective number of bits in the index, // but only for unsigned (signed stays negative). |