From: Keith Randall Date: Tue, 31 Aug 2021 21:53:53 +0000 (-0700) Subject: cmd/compile: assign results of transformAssign back to source location X-Git-Tag: go1.18beta1~1536 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=faf9c7d8fe9885a8d96de389f16bc4fdadb067a2;p=gostls13.git 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 Trust: Dan Scales Run-TryBot: Keith Randall TryBot-Result: Go Bot Reviewed-by: Dan Scales --- diff --git a/src/cmd/compile/internal/noder/stencil.go b/src/cmd/compile/internal/noder/stencil.go index 1717317925..7ba266a150 100644 --- a/src/cmd/compile/internal/noder/stencil.go +++ b/src/cmd/compile/internal/noder/stencil.go @@ -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: