2016-11-02 01:39:11 +01:00
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-empty.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=INVALID-EMPTY %s
|
2020-02-12 08:01:35 +01:00
|
|
|
RUN: not --crash llvm-dis -disable-output %p/Inputs/invalid-pr20485.bc 2>&1 | \
|
2015-01-24 05:15:05 +01:00
|
|
|
RUN: FileCheck --check-prefix=INVALID-ENCODING %s
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-abbrev.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=BAD-ABBREV %s
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-unexpected-eof.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=UNEXPECTED-EOF %s
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-bad-abbrev-number.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=BAD-ABBREV-NUMBER %s
|
2015-01-30 19:13:50 +01:00
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-type-table-forward-ref.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=BAD-TYPE-TABLE-FORWARD-REF %s
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-bitwidth.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=BAD-BITWIDTH %s
|
2015-02-22 20:32:03 +01:00
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-align.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=BAD-ALIGN %s
|
2015-03-16 22:35:48 +01:00
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-gep-mismatched-explicit-type.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=MISMATCHED-EXPLICIT-GEP %s
|
2015-03-16 22:48:46 +01:00
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-load-mismatched-explicit-type.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=MISMATCHED-EXPLICIT-LOAD %s
|
2015-03-16 23:03:50 +01:00
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-gep-operator-mismatched-explicit-type.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=MISMATCHED-EXPLICIT-GEP-OPERATOR %s
|
2015-04-17 08:40:14 +02:00
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-call-mismatched-explicit-type.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=MISMATCHED-EXPLICIT-CALL %s
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-call-non-function-explicit-type.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=NON-FUNCTION-EXPLICIT-CALL %s
|
2015-04-24 20:06:06 +02:00
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-invoke-mismatched-explicit-type.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=MISMATCHED-EXPLICIT-INVOKE %s
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-invoke-non-function-explicit-type.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=NON-FUNCTION-EXPLICIT-INVOKE %s
|
2015-01-24 05:15:05 +01:00
|
|
|
|
2019-06-26 21:50:12 +02:00
|
|
|
INVALID-EMPTY: error: file too small to contain bitcode header
|
2015-01-24 05:15:05 +01:00
|
|
|
INVALID-ENCODING: Invalid encoding
|
2019-06-27 01:08:29 +02:00
|
|
|
BAD-ABBREV: error: can't skip to bit
|
|
|
|
UNEXPECTED-EOF: error: can't skip to bit
|
|
|
|
BAD-ABBREV-NUMBER: error: can't skip to bit
|
2015-01-30 19:13:50 +01:00
|
|
|
BAD-TYPE-TABLE-FORWARD-REF: Invalid TYPE table: Only named structs can be forward referenced
|
2019-06-27 01:08:29 +02:00
|
|
|
BAD-BITWIDTH: error: can't skip to bit
|
2015-02-22 20:32:03 +01:00
|
|
|
BAD-ALIGN: Invalid alignment value
|
2015-03-16 22:35:48 +01:00
|
|
|
MISMATCHED-EXPLICIT-GEP: Explicit gep type does not match pointee type of pointer operand
|
2015-05-18 23:48:55 +02:00
|
|
|
MISMATCHED-EXPLICIT-LOAD: Explicit load/store type does not match pointee type of pointer operand
|
2015-03-16 23:03:50 +01:00
|
|
|
MISMATCHED-EXPLICIT-GEP-OPERATOR: Explicit gep operator type does not match pointee type of pointer operand
|
2015-04-17 08:40:14 +02:00
|
|
|
MISMATCHED-EXPLICIT-CALL: Explicit call type does not match pointee type of callee operand
|
|
|
|
NON-FUNCTION-EXPLICIT-CALL: Explicit call type is not a function type
|
2015-04-24 20:06:06 +02:00
|
|
|
MISMATCHED-EXPLICIT-INVOKE: Explicit invoke type does not match pointee type of callee operand
|
|
|
|
NON-FUNCTION-EXPLICIT-INVOKE: Explicit invoke type is not a function type
|
2015-02-16 01:03:11 +01:00
|
|
|
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-extractval-array-idx.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=EXTRACT-ARRAY %s
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-extractval-struct-idx.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=EXTRACT-STRUCT %s
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-extractval-too-many-idxs.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=EXTRACT-IDXS %s
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-insertval-array-idx.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=INSERT-ARRAY %s
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-insertval-struct-idx.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=INSERT-STRUCT %s
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-insertval-too-many-idxs.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=INSERT-IDXS %s
|
|
|
|
|
|
|
|
|
|
|
|
EXTRACT-ARRAY: EXTRACTVAL: Invalid array index
|
|
|
|
EXTRACT-STRUCT: EXTRACTVAL: Invalid struct index
|
|
|
|
EXTRACT-IDXS: EXTRACTVAL: Invalid type
|
|
|
|
INSERT-ARRAY: INSERTVAL: Invalid array index
|
|
|
|
INSERT-STRUCT: INSERTVAL: Invalid struct index
|
|
|
|
INSERT-IDXS: INSERTVAL: Invalid type
|
2015-04-14 16:07:15 +02:00
|
|
|
|
2015-04-22 11:06:21 +02:00
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-fp-shift.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=FP-SHIFT %s
|
|
|
|
|
|
|
|
FP-SHIFT: Invalid record
|
2015-04-23 15:25:35 +02:00
|
|
|
|
2020-02-12 08:01:35 +01:00
|
|
|
RUN: not --crash llvm-dis -disable-output %p/Inputs/invalid-abbrev-vbr-size-too-big.bc 2>&1 | \
|
2015-04-23 15:25:35 +02:00
|
|
|
RUN: FileCheck --check-prefix=HUGE-ABBREV-OP %s
|
2020-02-12 08:01:35 +01:00
|
|
|
RUN: not --crash llvm-dis -disable-output %p/Inputs/invalid-abbrev-fixed-size-too-big.bc 2>&1 | \
|
2015-04-23 15:25:35 +02:00
|
|
|
RUN: FileCheck --check-prefix=HUGE-ABBREV-OP %s
|
|
|
|
|
|
|
|
HUGE-ABBREV-OP: Fixed or VBR abbrev record with size > MaxChunkData
|
2015-04-23 15:38:21 +02:00
|
|
|
|
2020-02-12 08:01:35 +01:00
|
|
|
RUN: not --crash llvm-dis -disable-output %p/Inputs/invalid-array-type.bc 2>&1 | \
|
2015-04-23 15:38:21 +02:00
|
|
|
RUN: FileCheck --check-prefix=ARRAY-TYPE %s
|
|
|
|
|
|
|
|
ARRAY-TYPE: Array element type can't be an Array or a Blob
|
2015-04-24 13:30:15 +02:00
|
|
|
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-non-vector-extractelement.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=INVALID-TYPE %s
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-non-vector-insertelement.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=INVALID-TYPE %s
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-non-vector-shufflevector.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=INVALID-TYPE %s
|
|
|
|
|
|
|
|
INVALID-TYPE: Invalid type for value
|
2015-04-28 22:18:47 +02:00
|
|
|
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-fwdref-type-mismatch.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=FWDREF-TYPE %s
|
|
|
|
|
|
|
|
FWDREF-TYPE: Invalid record
|
2015-04-29 03:27:01 +02:00
|
|
|
|
2015-05-27 03:05:40 +02:00
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-fwdref-type-mismatch-2.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=FWDREF-TYPE-MISMATCH %s
|
|
|
|
|
2016-11-16 22:44:45 +01:00
|
|
|
FWDREF-TYPE-MISMATCH: Malformed block
|
2015-05-27 03:05:40 +02:00
|
|
|
|
2015-04-29 03:27:01 +02:00
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-array-element-type.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=ELEMENT-TYPE %s
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-vector-element-type.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=ELEMENT-TYPE %s
|
2015-04-29 04:27:28 +02:00
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-pointer-element-type.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=ELEMENT-TYPE %s
|
2015-04-29 03:27:01 +02:00
|
|
|
|
|
|
|
ELEMENT-TYPE: Invalid type
|
2015-04-29 03:58:31 +02:00
|
|
|
|
2015-10-06 14:37:54 +02:00
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-cast.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=INVALID-CAST %s
|
|
|
|
|
|
|
|
INVALID-CAST: Invalid cast
|
|
|
|
|
2020-02-12 08:01:35 +01:00
|
|
|
RUN: not --crash llvm-dis -disable-output %p/Inputs/invalid-array-op-not-2nd-to-last.bc 2>&1 | \
|
2015-04-29 03:58:31 +02:00
|
|
|
RUN: FileCheck --check-prefix=ARRAY-NOT-2LAST %s
|
|
|
|
|
|
|
|
ARRAY-NOT-2LAST: Array op not second to last
|
2015-04-30 02:52:42 +02:00
|
|
|
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-too-big-fwdref.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=HUGE-FWDREF %s
|
|
|
|
|
|
|
|
HUGE-FWDREF: Invalid record
|
2015-04-30 03:13:31 +02:00
|
|
|
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-load-pointer-type.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=LOAD-BAD-TYPE %s
|
|
|
|
|
2019-06-27 16:46:51 +02:00
|
|
|
LOAD-BAD-TYPE: Load operand is not a pointer type
|
2015-04-30 06:09:41 +02:00
|
|
|
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-GCTable-overflow.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=GCTABLE-OFLOW %s
|
|
|
|
|
|
|
|
GCTABLE-OFLOW: Invalid ID
|
2015-05-16 02:33:12 +02:00
|
|
|
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-insert-0-indices.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=INSERT-0-IDXS %s
|
|
|
|
|
|
|
|
INSERT-0-IDXS: INSERTVAL: Invalid instruction with 0 indices
|
|
|
|
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-extract-0-indices.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=EXTRACT-0-IDXS %s
|
|
|
|
|
|
|
|
EXTRACT-0-IDXS: EXTRACTVAL: Invalid instruction with 0 indices
|
2015-05-18 23:48:55 +02:00
|
|
|
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-load-ptr-type.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=BAD-LOAD-PTR-TYPE %s
|
|
|
|
|
2019-06-27 01:08:29 +02:00
|
|
|
BAD-LOAD-PTR-TYPE: error: can't skip to bit
|
2015-05-19 00:27:11 +02:00
|
|
|
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-inserted-value-type-mismatch.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=INSERT-TYPE-MISMATCH %s
|
|
|
|
|
|
|
|
INSERT-TYPE-MISMATCH: Inserted value type doesn't match aggregate type
|
2015-05-19 02:34:17 +02:00
|
|
|
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-code-len-width.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=INVALID-CODELENWIDTH %s
|
|
|
|
|
2019-06-27 01:08:29 +02:00
|
|
|
INVALID-CODELENWIDTH: error: can't skip to bit
|
2015-05-19 03:21:06 +02:00
|
|
|
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-function-argument-type.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=INVALID-ARGUMENT-TYPE %s
|
|
|
|
|
|
|
|
INVALID-ARGUMENT-TYPE: Invalid function argument type
|
2015-05-19 20:18:10 +02:00
|
|
|
|
2015-05-27 01:00:56 +02:00
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-function-comdat-id.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=INVALID-FCOMDAT-ID %s
|
|
|
|
|
2016-11-16 22:44:45 +01:00
|
|
|
INVALID-FCOMDAT-ID: Malformed block
|
2015-05-27 01:00:56 +02:00
|
|
|
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-global-var-comdat-id.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=INVALID-GVCOMDAT-ID %s
|
|
|
|
|
|
|
|
INVALID-GVCOMDAT-ID: Invalid global variable comdat ID
|
2015-05-27 01:52:21 +02:00
|
|
|
|
2020-02-12 08:01:35 +01:00
|
|
|
RUN: not --crash llvm-dis -disable-output %p/Inputs/invalid-abbrev-no-operands.bc 2>&1 | \
|
2015-05-27 01:52:21 +02:00
|
|
|
RUN: FileCheck --check-prefix=ABBREV-NO-OPS %s
|
|
|
|
|
|
|
|
ABBREV-NO-OPS: Abbrev record with no operands
|
2015-05-27 02:48:43 +02:00
|
|
|
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-array-operand-encoding.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=ARRAY-OP-ENC %s
|
|
|
|
|
2016-11-16 22:44:45 +01:00
|
|
|
ARRAY-OP-ENC: Malformed block
|
2015-05-30 02:17:20 +02:00
|
|
|
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-metadata-not-followed-named-node.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=META-NOT-FOLLOWED-BY-NAMED-META %s
|
|
|
|
|
2016-11-16 22:44:45 +01:00
|
|
|
META-NOT-FOLLOWED-BY-NAMED-META: Malformed block
|
2015-06-03 02:05:30 +02:00
|
|
|
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-vector-length.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=VECTOR-LENGTH %s
|
|
|
|
|
|
|
|
VECTOR-LENGTH: Invalid vector length
|
2015-06-03 03:30:13 +02:00
|
|
|
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-alias-type-mismatch.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=ALIAS-TYPE-MISMATCH %s
|
|
|
|
|
|
|
|
ALIAS-TYPE-MISMATCH: Alias and aliasee types don't match
|
2015-11-03 14:48:26 +01:00
|
|
|
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-no-function-block.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=NO-FUNCTION-BLOCK %s
|
|
|
|
|
2016-11-09 01:51:04 +01:00
|
|
|
NO-FUNCTION-BLOCK: Trying to materialize functions before seeing function blocks (Producer: 'LLVM3.8.0git' Reader: 'LLVM
|
2015-11-04 15:53:36 +01:00
|
|
|
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-name-with-0-byte.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=NAME-WITH-0 %s
|
|
|
|
|
2016-11-16 22:44:45 +01:00
|
|
|
NAME-WITH-0: Malformed block
|
2016-06-05 20:43:17 +02:00
|
|
|
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-void-constant.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=VOID-CONSTANT-TYPE %s
|
|
|
|
|
|
|
|
VOID-CONSTANT-TYPE: Invalid constant type
|
2016-06-05 20:43:26 +02:00
|
|
|
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-gep-no-operands.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=GEP-NO-OPERANDS %s
|
|
|
|
|
|
|
|
GEP-NO-OPERANDS: Invalid gep with no operands
|
2016-06-05 20:43:33 +02:00
|
|
|
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-nonpointer-storeatomic.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=NONPOINTER-STOREATOMIC %s
|
|
|
|
|
|
|
|
NONPOINTER-STOREATOMIC: Invalid record
|
2016-06-05 20:43:40 +02:00
|
|
|
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-nonpointer-atomicrmw.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=NONPOINTER-ATOMICRMW %s
|
|
|
|
|
|
|
|
NONPOINTER-ATOMICRMW: Invalid record
|
2019-07-14 16:06:25 +02:00
|
|
|
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-fcmp-opnum.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=INVALID-FCMP-OPNUM %s
|
|
|
|
|
|
|
|
INVALID-FCMP-OPNUM: Invalid record: operand number exceeded available operands
|
2021-05-19 22:02:29 +02:00
|
|
|
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-cmpxchg-ordering.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=CMPXCHG-ORDERING %s
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-cmpxchg-ordering-2.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=CMPXCHG-ORDERING %s
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-cmpxchg-ordering-3.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=CMPXCHG-ORDERING %s
|
|
|
|
RUN: not llvm-dis -disable-output %p/Inputs/invalid-cmpxchg-ordering-4.bc 2>&1 | \
|
|
|
|
RUN: FileCheck --check-prefix=CMPXCHG-ORDERING %s
|
|
|
|
|
|
|
|
CMPXCHG-ORDERING: Invalid cmpxchg {{failure|success}} ordering
|