aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/gc_test.go
diff options
context:
space:
mode:
authorTodd Neal <todd@tneal.org>2015-10-29 21:45:19 -0500
committerTodd Neal <todd@tneal.org>2015-11-03 02:01:34 +0000
commite3e0122ae269027bfd2e2db1dbf106883ad5a8a7 (patch)
treec3313e876d4d10a4b340f0886305fb5cc60932d3 /src/runtime/gc_test.go
parentebafc80ebaa8d7e67ba72642eed67c0adfc0c0c3 (diff)
downloadgo-e3e0122ae269027bfd2e2db1dbf106883ad5a8a7.tar.gz
go-e3e0122ae269027bfd2e2db1dbf106883ad5a8a7.zip
test: use go:noinline consistently
Replace various implementations of inlining prevention with "go:noinline" Change-Id: Iac90895c3a62d6f4b7a6c72e11e165d15a0abfa4 Reviewed-on: https://go-review.googlesource.com/16510 Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: Todd Neal <todd@tneal.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/runtime/gc_test.go')
-rw-r--r--src/runtime/gc_test.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/runtime/gc_test.go b/src/runtime/gc_test.go
index 61bbc14945..ce61059e85 100644
--- a/src/runtime/gc_test.go
+++ b/src/runtime/gc_test.go
@@ -511,9 +511,11 @@ func TestAssertE2T2Liveness(t *testing.T) {
testIfaceEqual(io.EOF)
}
+var a bool
+
+//go:noinline
func testIfaceEqual(x interface{}) {
if x == "abc" {
- // Prevent inlining
- panic("")
+ a = true
}
}