]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: recognize reassignments involving receives
authorMatthew Dempsky <mdempsky@google.com>
Sun, 20 Dec 2020 09:15:46 +0000 (01:15 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Sun, 20 Dec 2020 09:43:29 +0000 (09:43 +0000)
commit89b44b4e2bb2f88474d6b8476f5c28ea2aea9b28
tree7226ca815c07dcab272ec63d38552ea20c7464f4
parent55b58018f41e6de63bdaa8f3d9a284077d4e88c1
cmd/compile: recognize reassignments involving receives

Previously, reassigned was failing to detect reassignments due to
channel receives in select statements (OSELRECV, OSELRECV2), or due to
standalone 2-value receive assignments (OAS2RECV). This was reported
as a devirtualization panic, but could have caused mis-inlining as
well.

Fixes #43292.

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