aboutsummaryrefslogtreecommitdiff
path: root/test/fixedbugs/issue48476.go
diff options
context:
space:
mode:
authorThan McIntosh <thanm@google.com>2021-11-04 14:11:57 -0400
committerThan McIntosh <thanm@google.com>2021-11-04 14:11:57 -0400
commit06a4b2790c5bb6530e0c4f05277b19c187134f49 (patch)
tree09017cea1bfb6b6ba6eb191438232c064d55153d /test/fixedbugs/issue48476.go
parent35d5cd0dcfb9d06064ec37da1621d24676454058 (diff)
parent23991f50b34f8707bcfc7761321bb3b0e9dba10e (diff)
downloadgo-06a4b2790c5bb6530e0c4f05277b19c187134f49.tar.gz
go-06a4b2790c5bb6530e0c4f05277b19c187134f49.zip
[dev.boringcrypto.go1.16] all: merge go1.16.10 into dev.boringcrypto.go1.16
Change-Id: I164105d3036f0729da3f0b1dfa034f1d1d6a3a27
Diffstat (limited to 'test/fixedbugs/issue48476.go')
-rw-r--r--test/fixedbugs/issue48476.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/fixedbugs/issue48476.go b/test/fixedbugs/issue48476.go
new file mode 100644
index 0000000000..6b77f7c3c6
--- /dev/null
+++ b/test/fixedbugs/issue48476.go
@@ -0,0 +1,21 @@
+// run
+
+// Copyright 2021 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 f(x uint64) uint64 {
+ s := "\x04"
+ c := s[0]
+ return x << c << 4
+}
+func main() {
+ if want, got := uint64(1<<8), f(1); want != got {
+ panic(fmt.Sprintf("want %x got %x", want, got))
+ }
+}