]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix lexical scope of escaped variables
authorAlessandro Arzilli <alessandro.arzilli@gmail.com>
Sun, 9 Jul 2017 15:03:45 +0000 (17:03 +0200)
committerMatthew Dempsky <mdempsky@google.com>
Mon, 10 Jul 2017 20:09:00 +0000 (20:09 +0000)
commit6f83b75be2bf038a3a919ad7bd64eda2ee9a934a
treebc9d277c288f1a69ce1288c04edb506c52eafe10
parent123fd4640ae27e7f179f84cd7efece07ab954b45
cmd/compile: fix lexical scope of escaped variables

When a local variable is moved to the heap the declaration position
should be preserved so that later on we can assign it to the correct
DW_TAG_lexical_block.

Fixes #20959

Change-Id: I3700ef53c68ccd506d0633f11374ad88a52b2898
Reviewed-on: https://go-review.googlesource.com/47852
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/esc.go
src/cmd/compile/internal/gc/scope_test.go