aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/atomic_init.c
blob: 6f773bef48cdaf88e91e523d88b9e06af1085668 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s

// Check that no atomic operations are used in any initialisation of _Atomic
// types.  

_Atomic(int) i = 42;

void foo()
{
  _Atomic(int) j = 12; // CHECK: store 
                       // CHECK-NOT: atomic
  __c11_atomic_init(&j, 42); // CHECK: store 
                             // CHECK-NOT: atomic
}