aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/arm-asm.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/arm-asm.c')
-rw-r--r--test/Sema/arm-asm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Sema/arm-asm.c b/test/Sema/arm-asm.c
index e48718b0a2ac..24fb5a7ecd82 100644
--- a/test/Sema/arm-asm.c
+++ b/test/Sema/arm-asm.c
@@ -10,3 +10,10 @@ void test_64bit_r(void) {
long long foo = 0, bar = 0;
asm volatile("INST %0, %1" : "=r"(foo) : "r"(bar));
}
+
+void test_clobber_conflict(void) {
+ register int x asm("r1");
+ asm volatile("nop" :: "r"(x) : "%r1"); // expected-error {{conflicts with asm clobber list}}
+ asm volatile("nop" :: "l"(x) : "%r1"); // expected-error {{conflicts with asm clobber list}}
+ asm volatile("nop" : "=r"(x) :: "%r1"); // expected-error {{conflicts with asm clobber list}}
+}