mirror of
https://github.com/golang/go.git
synced 2026-04-03 01:40:30 +09:00
Despite the cast from smaller to bigger slice, the elements after the input slice length are not actually read. Thus they should have nocheckptr annotation to make checkptr happy. Fixes #78413 Change-Id: I3e27eab8a69b37bb11632b130a87e6625e06e8ac Reviewed-on: https://go-review.googlesource.com/c/go/+/761120 Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
25 lines
414 B
Go
25 lines
414 B
Go
// run -gcflags=all=-d=checkptr
|
|
|
|
//go:build goexperiment.simd && amd64
|
|
|
|
// 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.
|
|
|
|
// Test case for issue #78413.
|
|
|
|
package main
|
|
|
|
import (
|
|
"simd/archsimd"
|
|
)
|
|
|
|
//go:noinline
|
|
func F() []int32 {
|
|
return []int32{0}
|
|
}
|
|
|
|
func main() {
|
|
archsimd.LoadInt32x8SlicePart(F())
|
|
}
|