blob: 8cdd54780d11ef3766ab73a1f866b8959f4e54cd [file] [log] [blame]
David Tweeddd6e1062012-10-26 10:17:44 +00001// REQUIRES: x86-64-registered-target
Chad Rosier15490fd2012-12-05 21:08:21 +00002// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -fasm-blocks -fenable-experimental-ms-inline-asm -Wno-microsoft -verify -fsyntax-only
Bob Wilsonb0f6b9c2012-09-24 19:57:59 +00003
4void t1(void) {
Eli Friedman5f1385b2012-10-23 02:43:30 +00005 __asm __asm // expected-error {{__asm used with no assembly instructions}}
6}
7
8void f() {
Chad Rosier0adc4d22012-10-26 18:33:59 +00009 int foo;
Eli Friedman5f1385b2012-10-23 02:43:30 +000010 __asm {
11 mov eax, eax
12 .unknowndirective // expected-error {{unknown directive}}
13 }
14 f();
15 __asm {
16 mov eax, 1+=2 // expected-error 2 {{unknown token in expression}}
17 }
18 f();
19 __asm {
20 mov eax, 1+++ // expected-error 2 {{unknown token in expression}}
21 }
Chad Rosier0adc4d22012-10-26 18:33:59 +000022 f();
23 __asm {
24 mov eax, TYPE cat // expected-error {{Unable to lookup TYPE of expr!}}
25 }
26 f();
27 __asm {
28 mov eax, SIZE foo // expected-error {{Unsupported directive!}}
29 }
30 f();
31 __asm {
32 mov eax, LENGTH foo // expected-error {{Unsupported directive!}}
33 }
34
Bob Wilsonb0f6b9c2012-09-24 19:57:59 +000035}