a type.";
    return false;
  }
  auto lengthIndex = 3;
  auto length = usedefs_.FindDef(inst->words[lengthIndex]);
  if (!length.first || !spvOpcodeIsConstant(length.second.opcode)) {
    DIAG(lengthIndex) << "OpTypeArray Length <id> '" << inst->words[lengthIndex]
                      << "' is not a scalar constant type.";
    return false;
  }

  // NOTE: Check the initialiser value of the constant
  auto constInst = length.second.words;
  auto constResultTypeIndex = 1;
  auto constResultType = usedefs_.FindDef(constInst[constResultTypeIndex]);
  if (!constResultType.first || SpvOpTypeInt != constResultType.second.opcode) {
    DIAG(lengthIndex) << "OpTypeArray Length <id> '" << inst->words[lengthIndex]
                      << "' is not a constant integer type.";
    return false;
  }

  switch (length.second.opcode) {
    case SpvOpSpecConstant:
    case SpvOpConstant:
      if (aboveZero(length.second.words, constResultType.second.words)) break;
    // Else fall through!
    case SpvOpConstantNull: {
  