Fix PR23872: Integrated assembler error message when using .type directive with ...
[oota-llvm.git] / test / MC / ELF / gnu-type-diagnostics.s
1 // RUN: not llvm-mc -triple i686-elf -filetype asm -o /dev/null %s 2>&1 | FileCheck %s
2 // RUN: not llvm-mc -triple aarch64-elf -filetype asm -o /dev/null %s 2>&1 | FileCheck %s
3 // RUN: not llvm-mc -triple arm-elf -filetype asm -o /dev/null %s 2>&1 \
4 // RUN:     | FileCheck -check-prefix=CHECK-INVALID-AT-IN-TYPE-DIRECTIVE %s
5 // RUN: not llvm-mc -triple armeb-elf -filetype asm -o /dev/null %s 2>&1 \
6 // RUN:     | FileCheck -check-prefix=CHECK-INVALID-AT-IN-TYPE-DIRECTIVE %s
7 // RUN: not llvm-mc -triple thumb-elf -filetype asm -o /dev/null %s 2>&1 \
8 // RUN:     | FileCheck -check-prefix=CHECK-INVALID-AT-IN-TYPE-DIRECTIVE %s
9 // RUN: not llvm-mc -triple thumbeb-elf -filetype asm -o /dev/null %s 2>&1 \
10 // RUN:     | FileCheck -check-prefix=CHECK-INVALID-AT-IN-TYPE-DIRECTIVE %s
11 // RUN: not llvm-mc -triple arm-coff -filetype asm -o /dev/null %s 2>&1 \
12 // RUN:     | FileCheck -check-prefix=CHECK-INVALID-AT-IN-TYPE-DIRECTIVE %s
13 // RUN: not llvm-mc -triple armeb-coff -filetype asm -o /dev/null %s 2>&1 \
14 // RUN:     | FileCheck -check-prefix=CHECK-INVALID-AT-IN-TYPE-DIRECTIVE %s
15 // RUN: not llvm-mc -triple thumb-coff -filetype asm -o /dev/null %s 2>&1 \
16 // RUN:     | FileCheck -check-prefix=CHECK-INVALID-AT-IN-TYPE-DIRECTIVE %s
17 // RUN: not llvm-mc -triple thumbeb-coff -filetype asm -o /dev/null %s 2>&1 \
18 // RUN:     | FileCheck -check-prefix=CHECK-INVALID-AT-IN-TYPE-DIRECTIVE %s
19 // RUN: not llvm-mc -triple arm-apple -filetype asm -o /dev/null %s 2>&1 \
20 // RUN:     | FileCheck -check-prefix=CHECK-INVALID-AT-IN-TYPE-DIRECTIVE %s
21 // RUN: not llvm-mc -triple armeb-apple -filetype asm -o /dev/null %s 2>&1 \
22 // RUN:     | FileCheck -check-prefix=CHECK-INVALID-AT-IN-TYPE-DIRECTIVE %s
23 // RUN: not llvm-mc -triple thumb-apple -filetype asm -o /dev/null %s 2>&1 \
24 // RUN:     | FileCheck -check-prefix=CHECK-INVALID-AT-IN-TYPE-DIRECTIVE %s
25 // RUN: not llvm-mc -triple thumbeb-apple -filetype asm -o /dev/null %s 2>&1 \
26 // RUN:     | FileCheck -check-prefix=CHECK-INVALID-AT-IN-TYPE-DIRECTIVE %s
27
28         .type TYPE FUNC
29 // CHECK: error: unsupported attribute in '.type' directive
30 // CHECK: .type TYPE FUNC
31 // CHECK:            ^
32
33         .type type stt_func
34 // CHECK: error: unsupported attribute in '.type' directive
35 // CHECK: .type type stt_func
36 // CHECK:            ^
37
38         .type symbol 32
39 // CHECK: error: expected STT_<TYPE_IN_UPPER_CASE>, '#<type>', '@<type>', '%<type>' or "<type>"
40 // CHECK: .type symbol 32
41 // CHECK:              ^
42
43 // CHECK-INVALID-AT-IN-TYPE-DIRECTIVE: error: expected STT_<TYPE_IN_UPPER_CASE>, '#<type>', '%<type>' or "<type>"
44 // CHECK-INVALID-AT-IN-TYPE-DIRECTIVE: .type symbol 32
45 // CHECK-INVALID-AT-IN-TYPE-DIRECTIVE:              ^
46