]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix rewriting slice literal call argument
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Sat, 30 Oct 2021 17:20:13 +0000 (00:20 +0700)
committerCuong Manh Le <cuong.manhle.vn@gmail.com>
Tue, 2 Nov 2021 16:19:45 +0000 (16:19 +0000)
commitf2ff1c6074b1591c231f8f6b3394f9700cac7fad
tree64ee697712c3ebf48f3dd037ca06450ecb26ac44
parentc6a0b6f2de9a778b03a29c656531617a606761f0
cmd/compile: fix rewriting slice literal call argument

When seeing Key:Value expression in slice literal, the compiler only
needs to emit tmp var for the Value, not the whole expression.

Fixes #49240

Change-Id: I7bda3c796a93c0fa1974f7c5930f38025dfa665c
Reviewed-on: https://go-review.googlesource.com/c/go/+/360055
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/escape/call.go
test/fixedbugs/issue49240.go [new file with mode: 0644]