brintos

brintos / llvm-project-archived public Read only

0
0
Text · 573 B · 30d4489 Raw
20 lines · c
1// RUN: %clang_cc1 %s -triple i686-apple-darwin -verify -fsyntax-only -fno-gnu-inline-asm2 3#if __has_extension(gnu_asm)4#error Expected extension 'gnu_asm' to be disabled5#endif6 7asm ("INST r1, 0"); // expected-error {{GNU-style inline assembly is disabled}}8 9void foo(void) __asm("__foo_func"); // AsmLabel is OK10int foo1 asm("bar1") = 0; // OK11 12asm(" "); // Whitespace is OK13 14void f (void) {15  long long foo = 0, bar;16  asm volatile("INST %0, %1" : "=r"(foo) : "r"(bar)); // expected-error {{GNU-style inline assembly is disabled}}17  asm (""); // Empty is OK18  return;19}20