1 // Copyright 2023 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
12 //go:linkname heapObjectsCanMove runtime.heapObjectsCanMove
13 func heapObjectsCanMove() bool
15 func TestHeapObjectsCanMove(t *testing.T) {
16 if heapObjectsCanMove() {
17 // If this happens (or this test stops building),
18 // it will break go4.org/unsafe/assume-no-moving-gc.
19 t.Fatalf("heap objects can move!")