1
0
mirror of https://github.com/golang/go synced 2024-11-15 12:10:22 -07:00
go/test/codegen/issue60673.go
Keith Randall c643b29381 cmd/compile: use callsite as line number for argument marshaling
Don't use the line number of the argument itself, as that may be from
arbitrarily earlier in the function.

Fixes #60673

Change-Id: Ifc0a2aaae221a256be3a4b0b2e04849bae4b79d7
Reviewed-on: https://go-review.googlesource.com/c/go/+/502656
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Keith Randall <khr@google.com>
2023-06-12 20:34:37 +00:00

19 lines
360 B
Go

// asmcheck
// Copyright 2023 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.
package codegen
//go:noinline
func f(x int32) {
}
func g(p *int32) {
// argument marshaling code should live at line 17, not line 15.
x := *p
// 386: `MOVL\s[A-Z]+,\s\(SP\)`
f(x)
}