1// RUN: %clang_cc1 %s -triple=i686-apple-darwin9 -verify
2// rdar://13973577
3
4struct foo {
5  int big[128];
6};
7struct bar {
8  char c[3];
9};
10
11struct bar smallThing;
12struct foo bigThing;
13_Atomic(struct foo) bigAtomic;
14
15void structAtomicStore() {
16  struct foo f = {0};
17  __c11_atomic_store(&bigAtomic, f, 5); // expected-error {{atomic store requires runtime support that is not available for this target}}
18
19  struct bar b = {0};
20  __atomic_store(&smallThing, &b, 5);
21
22  __atomic_store(&bigThing, &f, 5);
23}
24
25void structAtomicLoad() {
26  struct foo f = __c11_atomic_load(&bigAtomic, 5); // expected-error {{atomic load requires runtime support that is not available for this target}}
27  struct bar b;
28  __atomic_load(&smallThing, &b, 5);
29
30  __atomic_load(&bigThing, &f, 5);
31}
32