1// Copyright 2024 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Test that a linkname applied on an assembly declaration
6// does not affect stack map generation.
7
8package main
9
10import (
11	"runtime"
12	_ "unsafe"
13)
14
15//go:linkname asm
16func asm(*int)
17
18func main() {
19	x := new(int)
20	asm(x)
21}
22
23// called from asm
24func callback() {
25	runtime.GC() // scan stack
26}
27