blob: 03c2ede9488900334501e791bc9ef2c2c9fcd5b5 [file] [log] [blame]
Steven Wucb0d13f2015-01-16 23:05:28 +00001// RUN: %clang_cc1 %s -triple i686-apple-darwin -verify -fsyntax-only -fno-gnu-inline-asm
2
Steven Wu2baa53a2015-04-28 21:49:09 +00003asm ("INST r1, 0"); // expected-error {{GNU-style inline assembly is disabled}}
Steven Wu6b72a672015-05-11 21:14:09 +00004
5void foo() __asm("__foo_func"); // AsmLabel is OK
6int foo1 asm("bar1") = 0; // OK
7
Steven Wu18bbe192015-05-12 00:16:37 +00008asm(" "); // Whitespace is OK
9
Steven Wucb0d13f2015-01-16 23:05:28 +000010void f (void) {
11 long long foo = 0, bar;
12 asm volatile("INST %0, %1" : "=r"(foo) : "r"(bar)); // expected-error {{GNU-style inline assembly is disabled}}
Steven Wu18bbe192015-05-12 00:16:37 +000013 asm (""); // Empty is OK
Steven Wucb0d13f2015-01-16 23:05:28 +000014 return;
15}