1 // run -gcflags="-d=checkptr"
3 // Copyright 2021 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.
18 panic("expected panic")
20 if got := err.(error).Error(); !strings.Contains(got, "slice bounds out of range") {
21 panic("expected panic slice out of bound, got " + got)
24 s := make([]int64, 100)
25 p := unsafe.Pointer(&s[0])
28 _ = (*[10]int64)(p)[:n:n]