]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: allow StructSelect [x] of interface data fields for x>0
authorKeith Randall <khr@golang.org>
Tue, 5 Aug 2025 20:37:21 +0000 (13:37 -0700)
committerKeith Randall <khr@golang.org>
Tue, 5 Aug 2025 21:30:13 +0000 (14:30 -0700)
commitbcd25c79aa5675d3e5d28c09715b8147906da006
treecd6eed80bda51d20b3e40ec6c7d937155f5130b7
parentb0945a54b5ec65f79ad722d62f8c3ed62ba0b9d9
cmd/compile: allow StructSelect [x] of interface data fields for x>0

As of CL 681937 we can now have structs which are pointer shaped, but
their pointer field is not the first field, like struct{ struct{}; *int }.

Fixes #74888

Change-Id: Idc80f6b1abde3ae01437e2a9cadb5aa23d04b806
Reviewed-on: https://go-review.googlesource.com/c/go/+/693415
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/compile/internal/ssa/_gen/dec.rules
src/cmd/compile/internal/ssa/rewritedec.go
test/fixedbugs/issue74888.go [new file with mode: 0644]