]> Cypherpunks.ru repositories - gostls13.git/commit
[release-branch.go1.20] cmd/compile: fix ir.StaticValue for ORANGE
authorJunwei Zuo <zuojunwei.2023@bytedance.com>
Wed, 12 Apr 2023 10:53:51 +0000 (18:53 +0800)
committerMatthew Dempsky <mdempsky@google.com>
Wed, 12 Apr 2023 20:25:12 +0000 (20:25 +0000)
commit1dbbac7d796041eac4791fc0caa9315bd50ea964
tree44a9f3d860148f4d49aad6f38d4e368f5bdbcb8e
parent99001c460e9c552c9ccc8a65c428bbe4d6128085
[release-branch.go1.20] cmd/compile: fix ir.StaticValue for ORANGE

Range statement will mutate the key and value, so we should treat them as reassigned.

Fixes #59580

Change-Id: I9c6b67d938760a0c6a1d9739f2737c67af4a3a10
Reviewed-on: https://go-review.googlesource.com/c/go/+/483855
Run-TryBot: Wayne Zuo <wdvxdr@golangcn.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
(cherry picked from commit 89567a35c11c343cf765d6fb1270e1250e50d83f)
Reviewed-on: https://go-review.googlesource.com/c/go/+/484136
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/ir/expr.go
test/fixedbugs/issue59572.go [new file with mode: 0644]
test/fixedbugs/issue59572.out [new file with mode: 0644]