From faf9c7d8fe9885a8d96de389f16bc4fdadb067a2 Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Tue, 31 Aug 2021 14:53:53 -0700 Subject: [PATCH] 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 --- src/cmd/compile/internal/noder/stencil.go | 1 + 1 file changed, 1 insertion(+) 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: