Go version
go1.22
Output of go env in your module/workspace:
What did you do?
Compile the following:
var sink A
func main() {
sink = A{31, false, true, 12}
}
type A struct {
a byte
b bool
c bool
d int8
}
What did you see happen?
The compiler output something like:
0x0000 00000 (main.go:13) MOVB $31, main.sink(SB)
0x0007 00007 (main.go:13) MOVB $0, main.sink+1(SB)
0x000e 00014 (main.go:13) MOVB $1, main.sink+2(SB)
0x0015 00021 (main.go:13) MOVB $12, main.sink+3(SB)
What did you expect to see?
A single MOVL instruction.
Go version
go1.22
Output of
go envin your module/workspace:What did you do?
Compile the following:
What did you see happen?
The compiler output something like:
What did you expect to see?
A single MOVL instruction.