]> granicus.if.org Git - clang/commitdiff
Add test for PR12527 (bug has apparently already been fixed).
authorRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 1 Apr 2013 17:41:23 +0000 (17:41 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 1 Apr 2013 17:41:23 +0000 (17:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178476 91177308-0d34-0410-b5e6-96231b3b80d8

test/Sema/atomic-ops.c

index a33ff2b19c04058193281539c1d731d5f1e85848..b3daa0704dc99861ec7fdb48eff4d1f9ccd2dfd3 100644 (file)
@@ -173,3 +173,6 @@ void f(_Atomic(int) *i, _Atomic(int*) *p, _Atomic(float) *d,
   __c11_atomic_store(&const_atomic, 0, memory_order_release); // expected-error {{first argument to atomic operation must be a pointer to non-const _Atomic type ('const _Atomic(int) *' invalid)}}
   __c11_atomic_load(&const_atomic, memory_order_acquire); // expected-error {{first argument to atomic operation must be a pointer to non-const _Atomic type ('const _Atomic(int) *' invalid)}}
 }
+
+_Atomic(int*) PR12527_a;
+void PR12527() { int *b = PR12527_a; }