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