diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-05-27 18:47:56 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-05-27 18:47:56 +0000 |
commit | 5e20cdd81c44a443562a09007668ffdf76c455af (patch) | |
tree | dbbd4047878da71c1a706e26ce05b4e7791b14cc /test/Parser/no-gnu-inline-asm.c | |
parent | d5f23b0b7528b5c3caed1ba14f897cc4aaa9e3c3 (diff) |
Notes
Diffstat (limited to 'test/Parser/no-gnu-inline-asm.c')
-rw-r--r-- | test/Parser/no-gnu-inline-asm.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Parser/no-gnu-inline-asm.c b/test/Parser/no-gnu-inline-asm.c new file mode 100644 index 000000000000..03c2ede94889 --- /dev/null +++ b/test/Parser/no-gnu-inline-asm.c @@ -0,0 +1,15 @@ +// RUN: %clang_cc1 %s -triple i686-apple-darwin -verify -fsyntax-only -fno-gnu-inline-asm + +asm ("INST r1, 0"); // expected-error {{GNU-style inline assembly is disabled}} + +void foo() __asm("__foo_func"); // AsmLabel is OK +int foo1 asm("bar1") = 0; // OK + +asm(" "); // Whitespace is OK + +void f (void) { + long long foo = 0, bar; + asm volatile("INST %0, %1" : "=r"(foo) : "r"(bar)); // expected-error {{GNU-style inline assembly is disabled}} + asm (""); // Empty is OK + return; +} |