blob: 2fe77989b2a50ba16261c9b2a6e3bbc3ce6752f6 [file] [log] [blame]
Filipe Cabecinhasde968ec2015-01-24 04:15:05 +00001RUN: not llvm-dis -disable-output %p/Inputs/invalid-pr20485.bc 2>&1 | \
2RUN: FileCheck --check-prefix=INVALID-ENCODING %s
3RUN: not llvm-dis -disable-output %p/Inputs/invalid-abbrev.bc 2>&1 | \
4RUN: FileCheck --check-prefix=BAD-ABBREV %s
5RUN: not llvm-dis -disable-output %p/Inputs/invalid-unexpected-eof.bc 2>&1 | \
6RUN: FileCheck --check-prefix=UNEXPECTED-EOF %s
7RUN: not llvm-dis -disable-output %p/Inputs/invalid-bad-abbrev-number.bc 2>&1 | \
8RUN: FileCheck --check-prefix=BAD-ABBREV-NUMBER %s
Filipe Cabecinhasfcd044b2015-01-30 18:13:50 +00009RUN: not llvm-dis -disable-output %p/Inputs/invalid-type-table-forward-ref.bc 2>&1 | \
10RUN: FileCheck --check-prefix=BAD-TYPE-TABLE-FORWARD-REF %s
11RUN: not llvm-dis -disable-output %p/Inputs/invalid-bitwidth.bc 2>&1 | \
12RUN: FileCheck --check-prefix=BAD-BITWIDTH %s
JF Bastien30bf96b2015-02-22 19:32:03 +000013RUN: not llvm-dis -disable-output %p/Inputs/invalid-align.bc 2>&1 | \
14RUN: FileCheck --check-prefix=BAD-ALIGN %s
David Blaikie675e8cb2015-03-16 21:35:48 +000015RUN: not llvm-dis -disable-output %p/Inputs/invalid-gep-mismatched-explicit-type.bc 2>&1 | \
16RUN: FileCheck --check-prefix=MISMATCHED-EXPLICIT-GEP %s
David Blaikiec695cc72015-03-16 21:48:46 +000017RUN: not llvm-dis -disable-output %p/Inputs/invalid-load-mismatched-explicit-type.bc 2>&1 | \
18RUN: FileCheck --check-prefix=MISMATCHED-EXPLICIT-LOAD %s
David Blaikie12cf5d702015-03-16 22:03:50 +000019RUN: not llvm-dis -disable-output %p/Inputs/invalid-gep-operator-mismatched-explicit-type.bc 2>&1 | \
20RUN: FileCheck --check-prefix=MISMATCHED-EXPLICIT-GEP-OPERATOR %s
David Blaikiedbe6e0f2015-04-17 06:40:14 +000021RUN: not llvm-dis -disable-output %p/Inputs/invalid-call-mismatched-explicit-type.bc 2>&1 | \
22RUN: FileCheck --check-prefix=MISMATCHED-EXPLICIT-CALL %s
23RUN: not llvm-dis -disable-output %p/Inputs/invalid-call-non-function-explicit-type.bc 2>&1 | \
24RUN: FileCheck --check-prefix=NON-FUNCTION-EXPLICIT-CALL %s
David Blaikie5ea1f7b2015-04-24 18:06:06 +000025RUN: not llvm-dis -disable-output %p/Inputs/invalid-invoke-mismatched-explicit-type.bc 2>&1 | \
26RUN: FileCheck --check-prefix=MISMATCHED-EXPLICIT-INVOKE %s
27RUN: not llvm-dis -disable-output %p/Inputs/invalid-invoke-non-function-explicit-type.bc 2>&1 | \
28RUN: FileCheck --check-prefix=NON-FUNCTION-EXPLICIT-INVOKE %s
Filipe Cabecinhasde968ec2015-01-24 04:15:05 +000029
30INVALID-ENCODING: Invalid encoding
31BAD-ABBREV: Abbreviation starts with an Array or a Blob
32UNEXPECTED-EOF: Unexpected end of file
33BAD-ABBREV-NUMBER: Invalid abbrev number
Filipe Cabecinhasfcd044b2015-01-30 18:13:50 +000034BAD-TYPE-TABLE-FORWARD-REF: Invalid TYPE table: Only named structs can be forward referenced
35BAD-BITWIDTH: Bitwidth for integer type out of range
JF Bastien30bf96b2015-02-22 19:32:03 +000036BAD-ALIGN: Invalid alignment value
David Blaikie675e8cb2015-03-16 21:35:48 +000037MISMATCHED-EXPLICIT-GEP: Explicit gep type does not match pointee type of pointer operand
David Blaikiec695cc72015-03-16 21:48:46 +000038MISMATCHED-EXPLICIT-LOAD: Explicit load type does not match pointee type of pointer operand
David Blaikie12cf5d702015-03-16 22:03:50 +000039MISMATCHED-EXPLICIT-GEP-OPERATOR: Explicit gep operator type does not match pointee type of pointer operand
David Blaikiedbe6e0f2015-04-17 06:40:14 +000040MISMATCHED-EXPLICIT-CALL: Explicit call type does not match pointee type of callee operand
41NON-FUNCTION-EXPLICIT-CALL: Explicit call type is not a function type
David Blaikie5ea1f7b2015-04-24 18:06:06 +000042MISMATCHED-EXPLICIT-INVOKE: Explicit invoke type does not match pointee type of callee operand
43NON-FUNCTION-EXPLICIT-INVOKE: Explicit invoke type is not a function type
Filipe Cabecinhasecf8f7f2015-02-16 00:03:11 +000044
45RUN: not llvm-dis -disable-output %p/Inputs/invalid-extractval-array-idx.bc 2>&1 | \
46RUN: FileCheck --check-prefix=EXTRACT-ARRAY %s
47RUN: not llvm-dis -disable-output %p/Inputs/invalid-extractval-struct-idx.bc 2>&1 | \
48RUN: FileCheck --check-prefix=EXTRACT-STRUCT %s
49RUN: not llvm-dis -disable-output %p/Inputs/invalid-extractval-too-many-idxs.bc 2>&1 | \
50RUN: FileCheck --check-prefix=EXTRACT-IDXS %s
51RUN: not llvm-dis -disable-output %p/Inputs/invalid-insertval-array-idx.bc 2>&1 | \
52RUN: FileCheck --check-prefix=INSERT-ARRAY %s
53RUN: not llvm-dis -disable-output %p/Inputs/invalid-insertval-struct-idx.bc 2>&1 | \
54RUN: FileCheck --check-prefix=INSERT-STRUCT %s
55RUN: not llvm-dis -disable-output %p/Inputs/invalid-insertval-too-many-idxs.bc 2>&1 | \
56RUN: FileCheck --check-prefix=INSERT-IDXS %s
57
58
59EXTRACT-ARRAY: EXTRACTVAL: Invalid array index
60EXTRACT-STRUCT: EXTRACTVAL: Invalid struct index
61EXTRACT-IDXS: EXTRACTVAL: Invalid type
62INSERT-ARRAY: INSERTVAL: Invalid array index
63INSERT-STRUCT: INSERTVAL: Invalid struct index
64INSERT-IDXS: INSERTVAL: Invalid type
Filipe Cabecinhas22554272015-04-14 14:07:15 +000065
66RUN: not llvm-dis -disable-output %p/Inputs/invalid-no-proper-module.bc 2>&1 | \
67RUN: FileCheck --check-prefix=NO-MODULE %s
68
69NO-MODULE: Malformed IR file
Filipe Cabecinhasea79c5b2015-04-22 09:06:21 +000070
71RUN: not llvm-dis -disable-output %p/Inputs/invalid-fp-shift.bc 2>&1 | \
72RUN: FileCheck --check-prefix=FP-SHIFT %s
73
74FP-SHIFT: Invalid record
Filipe Cabecinhasee48fea2015-04-23 13:25:35 +000075
76RUN: not llvm-dis -disable-output %p/Inputs/invalid-abbrev-vbr-size-too-big.bc 2>&1 | \
77RUN: FileCheck --check-prefix=HUGE-ABBREV-OP %s
78RUN: not llvm-dis -disable-output %p/Inputs/invalid-abbrev-fixed-size-too-big.bc 2>&1 | \
79RUN: FileCheck --check-prefix=HUGE-ABBREV-OP %s
80
81HUGE-ABBREV-OP: Fixed or VBR abbrev record with size > MaxChunkData
Filipe Cabecinhas6621cb72015-04-23 13:38:21 +000082
83RUN: not llvm-dis -disable-output %p/Inputs/invalid-array-type.bc 2>&1 | \
84RUN: FileCheck --check-prefix=ARRAY-TYPE %s
85
86ARRAY-TYPE: Array element type can't be an Array or a Blob
Filipe Cabecinhasff1e2342015-04-24 11:30:15 +000087
88RUN: not llvm-dis -disable-output %p/Inputs/invalid-non-vector-extractelement.bc 2>&1 | \
89RUN: FileCheck --check-prefix=INVALID-TYPE %s
90RUN: not llvm-dis -disable-output %p/Inputs/invalid-non-vector-insertelement.bc 2>&1 | \
91RUN: FileCheck --check-prefix=INVALID-TYPE %s
92RUN: not llvm-dis -disable-output %p/Inputs/invalid-non-vector-shufflevector.bc 2>&1 | \
93RUN: FileCheck --check-prefix=INVALID-TYPE %s
94
95INVALID-TYPE: Invalid type for value
Filipe Cabecinhasb435d0f2015-04-28 20:18:47 +000096
97RUN: not llvm-dis -disable-output %p/Inputs/invalid-fwdref-type-mismatch.bc 2>&1 | \
98RUN: FileCheck --check-prefix=FWDREF-TYPE %s
99
100FWDREF-TYPE: Invalid record
Filipe Cabecinhasf15fb032015-04-29 01:27:01 +0000101
102RUN: not llvm-dis -disable-output %p/Inputs/invalid-array-element-type.bc 2>&1 | \
103RUN: FileCheck --check-prefix=ELEMENT-TYPE %s
104RUN: not llvm-dis -disable-output %p/Inputs/invalid-vector-element-type.bc 2>&1 | \
105RUN: FileCheck --check-prefix=ELEMENT-TYPE %s
Filipe Cabecinhasd8a1bcd2015-04-29 02:27:28 +0000106RUN: not llvm-dis -disable-output %p/Inputs/invalid-pointer-element-type.bc 2>&1 | \
107RUN: FileCheck --check-prefix=ELEMENT-TYPE %s
Filipe Cabecinhasf15fb032015-04-29 01:27:01 +0000108
109ELEMENT-TYPE: Invalid type
Filipe Cabecinhas1351cba2015-04-29 01:58:31 +0000110
111RUN: not llvm-dis -disable-output %p/Inputs/invalid-array-op-not-2nd-to-last.bc 2>&1 | \
112RUN: FileCheck --check-prefix=ARRAY-NOT-2LAST %s
113
114ARRAY-NOT-2LAST: Array op not second to last
Filipe Cabecinhasbad07792015-04-30 00:52:42 +0000115
116RUN: not llvm-dis -disable-output %p/Inputs/invalid-too-big-fwdref.bc 2>&1 | \
117RUN: FileCheck --check-prefix=HUGE-FWDREF %s
118
119HUGE-FWDREF: Invalid record
Filipe Cabecinhas9a19e562015-04-30 01:13:31 +0000120
121RUN: not llvm-dis -disable-output %p/Inputs/invalid-load-pointer-type.bc 2>&1 | \
122RUN: FileCheck --check-prefix=LOAD-BAD-TYPE %s
123
124LOAD-BAD-TYPE: Load operand is not a pointer type
Filipe Cabecinhasf8a16a92015-04-30 04:09:41 +0000125
126RUN: not llvm-dis -disable-output %p/Inputs/invalid-GCTable-overflow.bc 2>&1 | \
127RUN: FileCheck --check-prefix=GCTABLE-OFLOW %s
128
129GCTABLE-OFLOW: Invalid ID