mirror of
https://github.com/golang/go
synced 2024-09-06 00:19:45 +00:00
test: add another test for issue 32680
Update #32680 Change-Id: I0318c22c22c5cd6ab6441d1aa2d1a40d20d71242 Reviewed-on: https://go-review.googlesource.com/c/go/+/185137 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com> Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
parent
e94472a369
commit
9a00e64633
16
test/fixedbugs/issue32680b.go
Normal file
16
test/fixedbugs/issue32680b.go
Normal file
|
@ -0,0 +1,16 @@
|
|||
// compile
|
||||
|
||||
// Copyright 2019 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 p
|
||||
|
||||
func hashBytesRaw(b0, b1, b2, b3, b7 byte) uint64 {
|
||||
return (uint64(b0) | uint64(b1)<<8 | uint64(b2)<<16 | uint64(b3)<<24)
|
||||
}
|
||||
|
||||
func doStuff(data []byte) uint64 {
|
||||
return hashBytesRaw(data[0], data[1], data[2], data[3], data[7])
|
||||
|
||||
}
|
Loading…
Reference in a new issue