3 // Copyright 2016 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
7 // Check that we do loads exactly once. The SSA backend
8 // once tried to do the load in f twice, once sign extended
9 // and once zero extended. This can cause problems in
10 // racy code, particularly sync/mutex.
14 func f(p *byte) bool {
24 c := make(chan struct{})
26 for i := 0; i < N; i++ {
32 for i := 0; i < N; i++ {
38 for i := 0; i < N; i++ {
40 panic("non-atomic load!")