Source file test/fixedbugs/issue20811.go
1 // run 2 3 // Copyright 2017 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 // Issue 20811: slice-in-bound check is lowered incorrectly on 8 // amd64p32. 9 10 package main 11 12 func main() { 13 i := g() 14 _ = "x"[int32(i)] 15 j := g() 16 _ = "x"[:int32(j)] 17 } 18 19 //go:noinline 20 func g() int64 { 21 return 4398046511104 22 } 23 24