summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/asm-errors.c
blob: 7042f313d7a4138c4d1bffb0b610534ce7a9e159 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// REQUIRES: x86-registered-target

// RUN: not %clang_cc1 -triple i386-apple-darwin10 -emit-obj %s -o /dev/null > %t 2>&1
// RUN: FileCheck %s < %t
// RUN: %clang_cc1 -triple i386-apple-darwin10 -emit-llvm-bc %s -o %t.bc
// RUN: %clang_cc1 -triple i386-apple-darwin10 -emit-obj %t.bc -o /dev/null 2>&1 | \
// RUN:   FileCheck --check-prefix=CRASH-REPORT %s
// CRASH-REPORT: <inline asm>:
// CRASH-REPORT: error: invalid instruction mnemonic 'abc'
// CRASH-REPORT-NOT: note: diagnostic msg:

int test1(int X) {
// CHECK: error: invalid instruction mnemonic 'abc'
  __asm__ ("abc incl    %0" : "+r" (X));
  return X;
}
OpenPOWER on IntegriCloud