Source file test/fixedbugs/issue82772.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, k int8, s uint64) int8 { return (x * k) >> s } 13 14 func main() { 15 if got := f(127, -15, 8); got != -1 { 16 fmt.Printf("int8(127*-15) >> 8 = %d, want -1\n", got) 17 panic("FAIL") 18 } 19 } 20