Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / honnef.co / go / tools@v0.0.1-2020.1.5 / staticcheck / testdata / src / CheckAtomicAlignment / atomic32.go
1 // +build 386 arm armbe mips mipsle ppc s390 sparc
2
3 package pkg
4
5 import "sync/atomic"
6
7 type T struct {
8         A int64
9         B int32
10         C int64
11 }
12
13 func fn() {
14         var v T
15         atomic.AddInt64(&v.A, 0)
16         atomic.AddInt64(&v.C, 0) // want `address of non 64-bit aligned field C passed to sync/atomic.AddInt64`
17         atomic.LoadInt64(&v.C)   // want `address of non 64-bit aligned field C passed to sync/atomic.LoadInt64`
18 }