From 474b9315adbd341f65b4c3247fb3f7871da427f3 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Mon, 1 Apr 2013 17:41:23 +0000 Subject: [PATCH] Add test for PR12527 (bug has apparently already been fixed). llvm-svn: 178476 --- clang/test/Sema/atomic-ops.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clang/test/Sema/atomic-ops.c b/clang/test/Sema/atomic-ops.c index a33ff2b19c04..b3daa0704dc9 100644 --- a/clang/test/Sema/atomic-ops.c +++ b/clang/test/Sema/atomic-ops.c @@ -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; }