blob: a90056e1f15fff1c485bfb027f94f3516d114d1a [file] [log] [blame]
Cherry Zhang8ff42602016-08-30 09:12:22 -04001// errorcheck -0 -d=ssa/intrinsics/debug
Cherry Zhangd63de282017-10-05 10:11:38 -04002// +build amd64 arm64 mips mipsle mips64 mips64le ppc64 ppc64le s390x
Cherry Zhang644c16c2016-09-06 08:48:14 -04003
4// Copyright 2016 The Go Authors. All rights reserved.
5// Use of this source code is governed by a BSD-style
6// license that can be found in the LICENSE file.
7
8package main
9
10import "sync/atomic"
11
12var x uint32
13
14func atomics() {
15 _ = atomic.LoadUint32(&x) // ERROR "intrinsic substitution for LoadUint32"
16 atomic.StoreUint32(&x, 1) // ERROR "intrinsic substitution for StoreUint32"
17 atomic.AddUint32(&x, 1) // ERROR "intrinsic substitution for AddUint32"
18 atomic.SwapUint32(&x, 1) // ERROR "intrinsic substitution for SwapUint32"
19 atomic.CompareAndSwapUint32(&x, 1, 2) // ERROR "intrinsic substitution for CompareAndSwapUint32"
20}