summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/no-gnu-inline-asm.c
blob: 7089fa4b7df816dd7cfe729a66c11a1e5cf4d573 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// 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

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}}
  return;
}
OpenPOWER on IntegriCloud