xref: /llvm-project/clang/test/CodeGen/asm-errors.c (revision 416ad130eab2047e64fa1be7ab5f60a6caad7cb9)
1 // REQUIRES: x86-registered-target
2 
3 // RUN: not %clang_cc1 -triple i386-apple-darwin10 -emit-obj %s -o /dev/null > %t 2>&1
4 // RUN: FileCheck %s < %t
5 // RUN: %clang_cc1 -triple i386-apple-darwin10 -emit-llvm-bc %s -o %t.bc
6 // RUN: %clang_cc1 -triple i386-apple-darwin10 -emit-obj %t.bc -o /dev/null 2>&1 | \
7 // RUN:   FileCheck --check-prefix=CRASH-REPORT %s
8 // CRASH-REPORT: <inline asm>:
9 // CRASH-REPORT: error: invalid instruction mnemonic 'abc'
10 // CRASH-REPORT-NOT: note: diagnostic msg:
11 
12 int test1(int X) {
13 // CHECK: error: invalid instruction mnemonic 'abc'
14   __asm__ ("abc incl    %0" : "+r" (X));
15   return X;
16 }
17