cmd/gc: racewalk: do not double function calls
Current racewalk transformation looks like: x := <-makeChan().c \/\/\/\/\/\/\/\/\/ runtime.raceread(&makeChan().c) x := <-makeChan().c and so makeChan() is called twice. With this CL the transformation looks like: x := <-makeChan().c \/\/\/\/\/\/\/\/\/ chan *tmp = &(makeChan().c) raceread(&*tmp) x := <-(*tmp) Fixes #4245. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6822075
Showing
Please
register
or
sign in
to comment