What version of Go are you using (go version)?
go1.19.1 windows/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
Windows 10 64-bit
What did you do?
Create a Go file xxx.go with the following content:
package vm
type A [2]uint32
//go:noescape
//go:nosplit
func fun(a A)
And the assembly file xxx_amd64.s:
#include "textflag.h"
#include "funcdata.h"
#include "go_asm.h"
// func fun(a A)
TEXT ·fun(SB), NOSPLIT | NOFRAME, $0-0
MOVQ a+0(FP), AX
RET
Then run go vet
What did you expect to see?
Nothing; in particular no false positive warning.
What did you see instead?
.\xxx_amd64.s:7:1: [amd64] fun: invalid MOVQ of a+0(FP); vm.A is 8-byte value
The size of the array is exactly 8 bytes and yet go vet warns that 8 bytes != 8 bytes.
What version of Go are you using (
go version)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env)?Windows 10 64-bit
What did you do?
Create a Go file
xxx.gowith the following content:And the assembly file
xxx_amd64.s:Then run
go vetWhat did you expect to see?
Nothing; in particular no false positive warning.
What did you see instead?
.\xxx_amd64.s:7:1: [amd64] fun: invalid MOVQ of a+0(FP); vm.A is 8-byte value
The size of the array is exactly 8 bytes and yet
go vetwarns that 8 bytes != 8 bytes.