diff options
Diffstat (limited to 'libgo/go/runtime/gc_test.go')
-rw-r--r-- | libgo/go/runtime/gc_test.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libgo/go/runtime/gc_test.go b/libgo/go/runtime/gc_test.go index 262f87d66b0..2a95cc70e84 100644 --- a/libgo/go/runtime/gc_test.go +++ b/libgo/go/runtime/gc_test.go @@ -471,4 +471,21 @@ func testAssertVar(x interface{}) error { return nil } +func TestAssertE2T2Liveness(t *testing.T) { + *runtime.TestingAssertE2T2GC = true + defer func() { + *runtime.TestingAssertE2T2GC = false + }() + + poisonStack() + testIfaceEqual(io.EOF) +} + +func testIfaceEqual(x interface{}) { + if x == "abc" { + // Prevent inlining + panic("") + } +} + */ |