diff options
author | Keith Randall <khr@golang.org> | 2016-09-06 14:48:47 -0700 |
---|---|---|
committer | Keith Randall <khr@golang.org> | 2016-09-07 02:07:03 +0000 |
commit | 923a74ce7710c1e3b24b4cc3220e2ba38d7673af (patch) | |
tree | 778aa88205123ea93ed6a6a2b4880f5d58bfb0e6 /test/live.go | |
parent | a6edffb28696b739136172995ed3ec000e8e6fdb (diff) | |
download | go-923a74ce7710c1e3b24b4cc3220e2ba38d7673af.tar.gz go-923a74ce7710c1e3b24b4cc3220e2ba38d7673af.zip |
cmd/compile: ignore contentEscapes for marking nodes as escaping
We can still stack allocate and VarKill nodes which don't
escape but their content does.
Fixes #16996
Change-Id: If8aa0fcf2c327b4cb880a3d5af8d213289e6f6bf
Reviewed-on: https://go-review.googlesource.com/28575
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'test/live.go')
-rw-r--r-- | test/live.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/live.go b/test/live.go index db47e14e93..ef0ade23c7 100644 --- a/test/live.go +++ b/test/live.go @@ -643,3 +643,13 @@ func good40() { printnl() // ERROR "live at call to printnl: autotmp_[0-9]+ ret$" _ = t } + +func ddd1(x, y *int) { // ERROR "live at entry to ddd1: x y$" + ddd2(x, y) // ERROR "live at call to ddd2: autotmp_[0-9]+$" + printnl() // nothing live here. See issue 16996. +} +func ddd2(a ...*int) { // ERROR "live at entry to ddd2: a$" + sink = a[0] +} + +var sink *int |