]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: avoid copying Pos from ONAME when creating converts for maps
authorDavid Chase <drchase@google.com>
Wed, 13 Jul 2022 18:27:45 +0000 (14:27 -0400)
committerDavid Chase <drchase@google.com>
Thu, 11 Aug 2022 21:21:49 +0000 (21:21 +0000)
commit0b79abc27e1e4ea4ef3c299206f49e0724b03d57
tree4e74cd88eef0274fd97255f6a4652b9771d3f861
parent7367aedfd2b787cff5ea0f883ed7805ead4d4ba6
cmd/compile: avoid copying Pos from ONAME when creating converts for maps

ONAME nodes are shared, so using their position for anything is almost
always a mistake.  There are probably more instances of this mistake
elsewhere.  For now, handle the case of map key temporaries, where it's
been a problem.

Fixes #53456.

Change-Id: Id44e845d08d428592ad3ba31986635b6b87b0041
Reviewed-on: https://go-review.googlesource.com/c/go/+/417076
Run-TryBot: David Chase <drchase@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/compile/internal/ssa/debug_lines_test.go
src/cmd/compile/internal/ssa/testdata/b53456.go [new file with mode: 0644]
src/cmd/compile/internal/walk/order.go