]> Cypherpunks repositories - gostls13.git/commit
cmd/gc: fix defer copy(x, <-c)
authorRuss Cox <rsc@golang.org>
Wed, 28 May 2014 03:59:06 +0000 (23:59 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 28 May 2014 03:59:06 +0000 (23:59 -0400)
commitceb982e0049d7464413528ffab87ed0b34bfb56a
tree3b143cdd4c4e5c698ad00d075c5f2d9acfe18b35
parentdaf9308066a71802ed723ba96459afe2558c62d9
cmd/gc: fix defer copy(x, <-c)

In the first very rough draft of the reordering code
that was introduced in the Go 1.3 cycle, the pre-allocated
temporary for a ... argument was held in n->right.
It moved to n->alloc but the code avoiding n->right
was left behind in order.c. In copy(x, <-c), the receive
is in n->right and must be processed. Delete the special
case code, removing the bug.

Fixes #8039.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/100820044
src/cmd/gc/order.c
test/fixedbugs/issue8039.go [new file with mode: 0644]