]> Cypherpunks repositories - gostls13.git/commit
cmd/gc: fix escape analysis for &x inside switch x := v.(type)
authorRuss Cox <rsc@golang.org>
Wed, 11 Jun 2014 15:48:47 +0000 (11:48 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 11 Jun 2014 15:48:47 +0000 (11:48 -0400)
commit775ab8eeaaea970ddfcb339c275f79cd98e6bca5
tree8a3f4ac7c18a9218304671d821472710f888815f
parent3ad9df0422213468e22078bf5957fcc2fcafc391
cmd/gc: fix escape analysis for &x inside switch x := v.(type)

The analysis for &x was using the loop depth on x set
during x's declaration. A type switch creates a list of
implicit declarations that were not getting initialized
with loop depths.

Fixes #8176.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/108860043
src/cmd/gc/esc.c
test/escape2.go