]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: ensure we evaluate side effects of len() arg
authorKeith Randall <khr@golang.org>
Fri, 14 Mar 2025 20:36:58 +0000 (13:36 -0700)
committerKeith Randall <khr@golang.org>
Mon, 21 Apr 2025 22:50:54 +0000 (15:50 -0700)
commit336626bac4c62b617127d41dccae17eed0350b0f
treeb37b2763f076159960c72e6c9eb181dcccc4ce54
parent8af32240c6c8f21695cdcb3b6df8293d7f2d3bc7
cmd/compile: ensure we evaluate side effects of len() arg

For any len() which requires the evaluation of its arg (according to the spec).

Update #72844

Change-Id: Id2b0bcc78073a6d5051abd000131dafdf65e7f26
Reviewed-on: https://go-review.googlesource.com/c/go/+/658097
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
src/cmd/compile/internal/ssagen/ssa.go
src/cmd/compile/internal/walk/builtin.go
test/fixedbugs/issue72844.go