]> Cypherpunks repositories - gostls13.git/commit
cmd/gc: return canonical Node* from temp
authorRuss Cox <rsc@golang.org>
Tue, 14 Jan 2014 15:43:13 +0000 (10:43 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 14 Jan 2014 15:43:13 +0000 (10:43 -0500)
commit334056a7bc68d3adef884bf1348b9227a98ab663
tree0d700db3eab7e3d82309bc406fb10f97fc727fbb
parent8bd8cede03e32c55844cfc433f66fc6da0564c8a
cmd/gc: return canonical Node* from temp

For historical reasons, temp was returning a copy
of the created Node*, not the original Node*.
This meant that if analysis recorded information in the
returned node (for example, n->addrtaken = 1), the
analysis would not show up on the original Node*, the
one kept in fn->dcl and consulted during liveness
bitmap creation.

Correct this, and watch for it when setting addrtaken.

Fixes #7083.

R=khr, dave, minux.ma
CC=golang-codereviews
https://golang.org/cl/51010045
src/cmd/gc/gen.c
src/cmd/gc/sinit.c
src/cmd/gc/typecheck.c
test/fixedbugs/issue7083.go [new file with mode: 0644]