-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.Performancecompiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Milestone
Description
Go version
go1.22
Output of go env
in your module/workspace:
GOARCH=amd64
GOOS=linux
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.
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.Performancecompiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Type
Projects
Status
Done