xref: /llvm-project/clang/test/SemaCXX/ext-int-asm.cpp (revision 6c75ab5f66b403f7ca67e86aeed3a58abe10570b)
1 // REQUIRES: x86-registered-target
2 // RUN: %clang_cc1 -fsyntax-only -verify %s -Wimplicit-int-conversion -triple x86_64-gnu-linux -fasm-blocks
3 
4 void NotAllowedInInlineAsm(_BitInt(9) in, _BitInt(9) out) {
5   __asm { mov eax, in} // expected-error{{invalid type '_BitInt(9)' in asm input}}
6   __asm { mov out, eax} // expected-error{{invalid type '_BitInt(9)' in asm output}}
7 
8   asm("" : "=g" (in));// expected-error{{invalid type '_BitInt(9)' in asm input}}
9   asm("" :: "r" (out));// expected-error{{invalid type '_BitInt(9)' in asm output}}
10 
11 }
12