aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/noder
diff options
context:
space:
mode:
authorCuong Manh Le <cuong.manhle.vn@gmail.com>2025-05-22 18:06:27 +0700
committerGopher Robot <gobot@golang.org>2025-05-22 09:51:56 -0700
commita0dc7bf08481d906cb7d65d86bb347a583d84fd0 (patch)
tree8a98f34e0006f8a2769a194d18093511d167c924 /src/cmd/compile/internal/noder
parent53b9eae3875122a65b387adf18c5cb7a67e824d7 (diff)
downloadgo-a0dc7bf08481d906cb7d65d86bb347a583d84fd0.tar.xz
cmd/compile: fix ICE when transforming loopvar
When transforming for loop variables, the compiler does roughly following steps: (1) prebody = {z := z' for z in leaked} ... (4) init' = (init : s/z/z' for z in leaked) However, the definition of z is not updated to `z := z'` statement, causing ReassignOracle incorrectly use the new init statement with z' instead of z, trigger the ICE. Fixing this by updating the correct/new definition statement for z during the prebody initialization. Fixes #73823 Change-Id: Ice2a6741be7478506c58f4000f591d5582029136 Reviewed-on: https://go-review.googlesource.com/c/go/+/675475 Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/cmd/compile/internal/noder')
0 files changed, 0 insertions, 0 deletions