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