diff options
Diffstat (limited to 'src/runtime/race/testdata')
| -rw-r--r-- | src/runtime/race/testdata/mop_test.go | 8 | ||||
| -rw-r--r-- | src/runtime/race/testdata/regression_test.go | 9 |
2 files changed, 3 insertions, 14 deletions
diff --git a/src/runtime/race/testdata/mop_test.go b/src/runtime/race/testdata/mop_test.go index d7cbc98f95..c96acb9021 100644 --- a/src/runtime/race/testdata/mop_test.go +++ b/src/runtime/race/testdata/mop_test.go @@ -1356,14 +1356,8 @@ type InterImpl struct { x, y int } +//go:noinline func (p InterImpl) Foo(x int) { - // prevent inlining - z := 42 - x = 85 - y := x / z - z = y * z - x = z * y - _, _, _ = x, y, z } type InterImpl2 InterImpl diff --git a/src/runtime/race/testdata/regression_test.go b/src/runtime/race/testdata/regression_test.go index d461269d98..6a7802fb02 100644 --- a/src/runtime/race/testdata/regression_test.go +++ b/src/runtime/race/testdata/regression_test.go @@ -65,10 +65,8 @@ type Image struct { min, max Rect } +//go:noinline func NewImage() Image { - var pleaseDoNotInlineMe stack - pleaseDoNotInlineMe.push(1) - _ = pleaseDoNotInlineMe.pop() return Image{} } @@ -113,11 +111,8 @@ type RpcChan struct { var makeChanCalls int +//go:noinline func makeChan() *RpcChan { - var pleaseDoNotInlineMe stack - pleaseDoNotInlineMe.push(1) - _ = pleaseDoNotInlineMe.pop() - makeChanCalls++ c := &RpcChan{make(chan bool, 1)} c.c <- true |
