1
0
mirror of https://github.com/golang/go synced 2024-11-17 18:04:48 -07:00

cmd/compile: assign results of transformAssign back to source location

Otherwise the modifications of transformAssign are dropped on the floor.

Change-Id: Id40782564952ed53f9ade1dba4e85290c8522abc
Reviewed-on: https://go-review.googlesource.com/c/go/+/346590
Trust: Keith Randall <khr@golang.org>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
This commit is contained in:
Keith Randall 2021-08-31 14:53:53 -07:00
parent 2dd7b770de
commit faf9c7d8fe

View File

@ -966,6 +966,7 @@ func (subst *subster) node(n ir.Node) ir.Node {
// of zeroing assignment of a dcl (rhs[0] is nil).
lhs, rhs := []ir.Node{as.X}, []ir.Node{as.Y}
transformAssign(as, lhs, rhs)
as.X, as.Y = lhs[0], rhs[0]
}
case ir.OASOP: