David Chisnall | 7a7ee30 | 2012-01-16 17:27:18 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s |
2 | |||||
3 | // Check that no atomic operations are used in any initialisation of _Atomic | ||||
4 | // types. | ||||
5 | |||||
6 | _Atomic(int) i = 42; | ||||
7 | |||||
8 | void foo() | ||||
9 | { | ||||
10 | _Atomic(int) j = 12; // CHECK: store | ||||
11 | // CHECK-NOT: atomic | ||||
12 | __atomic_init(&j, 42); // CHECK: store | ||||
13 | // CHECK-NOT: atomic | ||||
14 | } |