ms-inline-asm.c revision 872a6f6bfecf462a7cb1f124e2f5ee31c7a7e39d
1// REQUIRES: x86-64-registered-target 2// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -fasm-blocks -Wno-microsoft -verify -fsyntax-only 3// XFAIL: * 4 5void t1(void) { 6 __asm __asm // expected-error {{__asm used with no assembly instructions}} 7} 8 9void f() { 10 int foo; 11 __asm { 12 mov eax, eax 13 .unknowndirective // expected-error {{unknown directive}} 14 } 15 f(); 16 __asm { 17 mov eax, 1+=2 // expected-error 2 {{unknown token in expression}} 18 } 19 f(); 20 __asm { 21 mov eax, 1+++ // expected-error 2 {{unknown token in expression}} 22 } 23 f(); 24 __asm { 25 mov eax, LENGTH bar // expected-error {{Unable to lookup expr!}} 26 } 27 f(); 28 __asm { 29 mov eax, SIZE bar // expected-error {{Unable to lookup expr!}} 30 } 31 f(); 32 __asm { 33 mov eax, TYPE bar // expected-error {{Unable to lookup expr!}} 34 } 35} 36