Source file test/fixedbugs/issue82776.go
1 // run 2 3 // Copyright 2026 The Go Authors. All rights reserved. 4 // Use of this source code is governed by a BSD-style 5 // license that can be found in the LICENSE file. 6 7 package main 8 9 import "fmt" 10 11 //go:noinline 12 func f(x, y int8) int8 { return (x >> 7) >> (uint64(y) | 0xFFFFFFFF) } 13 14 func main() { 15 if got := f(127, -128); got != 0 { 16 fmt.Printf("(int8(127)>>7)>>(uint64(-128)|0xFFFFFFFF) = %d, want 0\n", got) 17 panic("FAIL") 18 } 19 } 20