1// compile
2
3// Copyright 2019 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// Make sure we can linkname to memmove with an unsafe.Pointer argument.
8
9package p
10
11import "unsafe"
12
13//go:linkname memmove runtime.memmove
14func memmove(to, from unsafe.Pointer, n uintptr)
15
16var V1, V2 int
17
18func F() {
19	memmove(unsafe.Pointer(&V1), unsafe.Pointer(&V2), unsafe.Sizeof(int(0)))
20}
21