Debian Codegraph @

staticcheck/sa1027/testdata/go1.0/CheckAtomicAlignment/atomic64.go

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 // +build amd64 amd64p32 arm64 ppc64 ppc64le mips64 mips64le mips64p32 mips64p32le s390x sparc64 riscv64 loong64
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)
17 atomic.LoadInt64(&v.C)
18 }