; OpSwitch minimum = 3 (header + selector + default); the literal/label target
; pairs are variable length. WordCount=2 is malformed.
; Test that malformed input is rejected early rather than silently causing
; integer underflow and potential process hang.

; RUN: not llvm-spirv %s -to-binary -o %t.spv 2>&1 | FileCheck %s
; CHECK: InvalidWordCount:

119734787 65536 0 10 0
2 Capability Kernel
3 MemoryModel 1 2
2 Switch 1 2
