]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: allow multi-field structs to be stored directly in interfaces
authorKeith Randall <khr@golang.org>
Sun, 15 Jun 2025 03:10:50 +0000 (20:10 -0700)
committerKeith Randall <khr@golang.org>
Fri, 14 Nov 2025 20:37:44 +0000 (12:37 -0800)
commit03ed43988ff7f7671094d8c455532de7f2242e70
treee02fdabb99b297c7d24d7f11e4831c12139bbdf8
parent1bb1f2bf0c07bbc583063a21b324407f7041e316
cmd/compile: allow multi-field structs to be stored directly in interfaces

If the struct is a bunch of 0-sized fields and one pointer field.

Merged revert-of-revert for 4 CLs.

original  revert
681937    695016
693415    694996
693615    695015
694195    694995

Fixes #74092
Update #74888
Update #74908
Update #74935
(updated issues are bugs in the last attempt at this)

Change-Id: I32246d49b8bac3bb080972dc06ab432a5480d560
Reviewed-on: https://go-review.googlesource.com/c/go/+/714421
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
13 files changed:
src/cmd/compile/internal/ssa/_gen/dec.rules
src/cmd/compile/internal/ssa/_gen/generic.rules
src/cmd/compile/internal/ssa/expand_calls.go
src/cmd/compile/internal/ssa/rewrite.go
src/cmd/compile/internal/ssa/rewritedec.go
src/cmd/compile/internal/ssa/rewritegeneric.go
src/cmd/compile/internal/types/type.go
src/internal/abi/type.go
src/reflect/type.go
src/reflect/value.go
test/fixedbugs/issue74888.go [new file with mode: 0644]
test/fixedbugs/issue74908.go [new file with mode: 0644]
test/fixedbugs/issue74935.go [new file with mode: 0644]