summaryrefslogtreecommitdiffstats
path: root/test/Sema/inline-asm-validate.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/inline-asm-validate.c')
-rw-r--r--test/Sema/inline-asm-validate.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Sema/inline-asm-validate.c b/test/Sema/inline-asm-validate.c
new file mode 100644
index 0000000..c32dedb
--- /dev/null
+++ b/test/Sema/inline-asm-validate.c
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -triple arm64-apple-macosx10.8.0 -fsyntax-only -verify %s
+// expected-no-diagnostics
+
+unsigned t, r, *p;
+
+int foo (void) {
+ __asm__ __volatile__( "stxr %w[_t], %[_r], [%[_p]]" : [_t] "=&r" (t) : [_p] "p" (p), [_r] "r" (r) : "memory");
+ return 1;
+}
OpenPOWER on IntegriCloud