/
githubmirror
/
go
Обзор
Документация
Войти
/
githubmirror
/
go
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/fixedbugs/issue79886.go
25 строк
460 B
Jorropo
cmd/compile: fix misscompilation of Rsh with 32bits rhs on arm64
11 июн 2026, 06:40
11 июн 2026, 06:40
f2f369d
Код
Авторство
О чём код?
// run // Copyright 2026 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "fmt" ) //go:noinline func shifted(x int64, y uint64) int64 { return x >> uint32(y) } func main() { x := int64(-0x4000000000000000) got := shifted(x, ^uint64(0)&^(1<<32-2)) want := x >> 1 if got != want { panic(fmt.Sprintf("want %d; got %d", want, got)) } }