]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: repair escape analysis of range &fixedArray
authorDavid Chase <drchase@google.com>
Mon, 28 Sep 2015 20:13:57 +0000 (16:13 -0400)
committerDavid Chase <drchase@google.com>
Thu, 1 Oct 2015 18:49:18 +0000 (18:49 +0000)
commit745cdc3ad7556ba073d2a55fa7cebb3fc683b94f
treef826c26b4d279322e422ce68c4639e291ba4bbff
parentdb70c019d7175de54583f99a38016f4ff7bb5eba
cmd/compile: repair escape analysis of range &fixedArray

The existing test did not take into account the implicit
dereference of &fixedArray and thus heap-escaped when it
was not necessary.

Also added a detailed test for this and related cases.

Fixes #12588

Change-Id: I951e9684a093082ccdca47710f69f4366bd6b3cf
Reviewed-on: https://go-review.googlesource.com/15130
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
src/cmd/compile/internal/gc/esc.go
test/fixedbugs/issue12588.go [new file with mode: 0644]