diff options
author | Keith Randall <khr@golang.org> | 2016-08-31 15:17:02 -0700 |
---|---|---|
committer | Keith Randall <khr@golang.org> | 2016-09-19 16:54:35 +0000 |
commit | ca4089ad62b806db7d3f32335d3f20865a75edcd (patch) | |
tree | 1ad59322d137643bd45decd92cc63017f650a906 /test/live.go | |
parent | faf611a07a7630a075fba3a555db7831e002122a (diff) | |
download | go-ca4089ad62b806db7d3f32335d3f20865a75edcd.tar.gz go-ca4089ad62b806db7d3f32335d3f20865a75edcd.zip |
cmd/compile: args no longer live until end-of-function
We're dropping this behavior in favor of runtime.KeepAlive.
Implement runtime.KeepAlive as an intrinsic.
Update #15843
Change-Id: Ib60225bd30d6770ece1c3c7d1339a06aa25b1cbc
Reviewed-on: https://go-review.googlesource.com/28310
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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/live.go b/test/live.go index 2ae8b8f7b6..25ea07d5de 100644 --- a/test/live.go +++ b/test/live.go @@ -651,8 +651,8 @@ func good40() { } func ddd1(x, y *int) { // ERROR "live at entry to ddd1: x y$" - ddd2(x, y) // ERROR "live at call to ddd2: x y autotmp_[0-9]+$" - printnl() // ERROR "live at call to printnl: x y$" + ddd2(x, y) // ERROR "live at call to ddd2: autotmp_[0-9]+$" + printnl() // Note: no autotmp live at printnl. See issue 16996. } func ddd2(a ...*int) { // ERROR "live at entry to ddd2: a$" |