llvm-project/clang/test/SemaCXX/ext-int-asm.cpp
Erich Keane 0c5db3e4aa Fix test from 5f1f4a5
My test needs a requires target clause to support inline assembly.  This
patch splits out the asm tests into a separate test so we don't skip the
rest of the conditions.
2020-05-14 08:22:08 -07:00

12 lines
542 B
C++

// REQUIRES: x86-registered-target
// RUN: %clang_cc1 -fsyntax-only -verify %s -Wimplicit-int-conversion -triple x86_64-gnu-linux -fasm-blocks
void NotAllowedInInlineAsm(_ExtInt(9) in, _ExtInt(9) out) {
__asm { mov eax, in} // expected-error{{invalid type '_ExtInt(9)' in asm input}}
__asm { mov out, eax} // expected-error{{invalid type '_ExtInt(9)' in asm output}}
asm("" : "=g" (in));// expected-error{{invalid type '_ExtInt(9)' in asm input}}
asm("" :: "r" (out));// expected-error{{invalid type '_ExtInt(9)' in asm output}}
}