aboutsummaryrefslogtreecommitdiff
path: root/test/uintptrescapes2.go
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2016-08-31 15:17:02 -0700
committerKeith Randall <khr@golang.org>2016-09-19 16:54:35 +0000
commitca4089ad62b806db7d3f32335d3f20865a75edcd (patch)
tree1ad59322d137643bd45decd92cc63017f650a906 /test/uintptrescapes2.go
parentfaf611a07a7630a075fba3a555db7831e002122a (diff)
downloadgo-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/uintptrescapes2.go')
-rw-r--r--test/uintptrescapes2.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/uintptrescapes2.go b/test/uintptrescapes2.go
index 7ff676db14..d39bab764a 100644
--- a/test/uintptrescapes2.go
+++ b/test/uintptrescapes2.go
@@ -18,14 +18,14 @@ func F1(a uintptr) {} // ERROR "escaping uintptr"
//go:uintptrescapes
//go:noinline
-func F2(a ...uintptr) {} // ERROR "escaping ...uintptr" "live at entry" "a does not escape"
+func F2(a ...uintptr) {} // ERROR "escaping ...uintptr" "a does not escape"
func G() {
- var t int // ERROR "moved to heap"
+ var t int // ERROR "moved to heap"
F1(uintptr(unsafe.Pointer(&t))) // ERROR "live at call to F1: autotmp" "&t escapes to heap"
}
func H() {
- var v int // ERROR "moved to heap"
+ var v int // ERROR "moved to heap"
F2(0, 1, uintptr(unsafe.Pointer(&v)), 2) // ERROR "live at call to newobject: autotmp" "live at call to F2: autotmp" "escapes to heap"
}