.githooks/ compiler/ kernel/ lib/ scripts/ seed/ sublime/ test/ boot/ bootstrap/ compiler/ cycles/ dispatch/ format/ host/ integration/ kernel/ loader/ manifests/ mmio/ native/ packages/ runtime/ scheduling/ shared/ slots/ smp/ std/ sync/ termination/ tests/ asm.link/ asm.rodata.prefix/ assign.qualified.static/ entry.storage.start/ fn.unsafe.callbacks/ method.module/ optional.union.const.match/ record.opaque/ ref.qualified.static/ return.never/ stack.limit.ok/ stack.limit.trap/ start.default/ start.exit/ wildcard.import.owner/ abi.sizes.rad 3.5 KiB addfn.rad 52 B addfn.ril 76 B address.literal.aggregate.rad 6.2 KiB address.literal.escape.reject.rad 1.4 KiB address.literal.local.mutable.reject.rad 293 B address.literal.local.reject.rad 336 B address.literal.mutable.rad 1.3 KiB address.literal.shared.rad 734 B address.literal.shared.ril 1.0 KiB address.value.escape.reject.rad 2.5 KiB address.value.linear.field.reject.rad 297 B address.value.linear.mutable.reject.rad 262 B address.value.linear.reject.rad 303 B address.value.local.mutable.reject.rad 361 B address.value.local.reject.rad 322 B address.value.rad 6.7 KiB address.value.temporary.rad 1.2 KiB address.value.temporary.ril 1.6 KiB aggregate.return.rad 4.1 KiB alloc.arena.trait.rad 2.7 KiB alloc.new.arena.rad 1.8 KiB alloc.new.rad 1.0 KiB arena.static.rad 1.1 KiB arith.assignment.rad 631 B arith.basic.rad 189 B arith.modulo.rad 109 B arith.subword.rad 3.9 KiB arith.subword.ril 4.3 KiB arith.sum.rad 192 B arith.w64.rad 4.1 KiB arith.w64.ril 5.2 KiB array.aggregate.stride.rad 773 B array.aggregate.stride.ril 697 B array.assign.rad 225 B array.assign.ril 570 B array.bound.signature.rad 695 B array.bounds.check.rad 321 B array.fn.assign.rad 265 B array.index.assign.rad 422 B array.index.rad 278 B array.index.ril 520 B array.len.const.rad 348 B array.len.const.ril 333 B array.length.rad 281 B array.literal.rad 136 B array.literal.ril 376 B array.math.rad 1.2 KiB array.nested.assign.rad 320 B array.nested.rad 318 B array.nested.ril 995 B array.pointer.rad 2.5 KiB array.record.elements.rad 1.7 KiB array.repeat.edge.rad 548 B array.repeat.element.type.rad 1.2 KiB array.repeat.loop.lower.rad 1.5 KiB array.repeat.loop.lower.ril 2.1 KiB array.repeat.loop.rad 52.3 KiB array.repeat.rad 831 B array.repeat.ril 2.4 KiB array.repeat.word.aggregate.lower.rad 2.0 KiB array.repeat.word.aggregate.lower.ril 3.7 KiB array.repeat.word.aggregate.rad 4.6 KiB array.repeat.word.lower.rad 2.3 KiB array.repeat.word.lower.ril 4.8 KiB array.repeat.word.rad 53.8 KiB array.return.rad 344 B array.slice.empty.rad 127 B array.slice.full.rad 124 B array.slice.full.ril 253 B array.slice.gen.end.rad 156 B array.slice.gen.index.rad 167 B array.slice.gen.open.rad 154 B array.slice.gen.start.end.rad 158 B array.slice.gen.start.rad 156 B array.slice.openend.rad 149 B array.slice.openend.ril 436 B array.slice.openstart.rad 149 B array.slice.openstart.ril 373 B array.slice.rad 816 B as.precedence.rad 224 B asm.arithmetic.spacing.ras 537 B asm.atomic.reserve.ras 1.1 KiB asm.basic.text.program.ras 191 B asm.bleu.ras 251 B asm.branch.comparisons.ras 652 B asm.call.return.flow.ras 205 B asm.compare.set.logic.ras 613 B asm.csr.system.instructions.ras 223 B asm.data.directives.ras 441 B asm.data.symbol.fixup.ras 229 B asm.directive.boundary.values.ras 813 B asm.divrem.edges.ras 2.5 KiB asm.fence.ras 78 B asm.global.scoped.symbols.ras 211 B asm.instruction.matrix.alu.ras 568 B asm.instruction.matrix.mem.control.ras 357 B asm.instruction.matrix.system.ras 117 B asm.label.fixups.ras 237 B asm.li.expressions.ras 214 B asm.li.wide.ras 578 B asm.load.store.widths.ras 713 B asm.mul.div.rem.ras 773 B asm.mulh.ras 2.3 KiB asm.scoped.symbols.la.ras 152 B asm.scoped.symbols.tail.ras 161 B asm.section.switching.ras 177 B asm.space.constant.expressions.ras 360 B asm.string.directive.lists.ras 328 B asm.vector.integer.ras 633 B asm.word.dword.constants.ras 375 B asm.word.shift.ops.ras 872 B assert.basic.rad 398 B assert.basic.ril 623 B assert.fail.rad 138 B assert.false.rad 140 B assert.message.rad 123 B assert.message.ril 141 B assert.true.rad 115 B assign.loop.rad 213 B assign.loop.ril 242 B assign.multi.var.rad 194 B assign.multi.var.ril 73 B assign.mutable.rad 6.2 KiB assign.param.rad 150 B assign.param.ril 96 B assign.rad 156 B assign.self.ref.rad 161 B assign.self.ref.ril 92 B assign.sequential.rad 163 B assign.sequential.ril 52 B assign.shadow.mutable.rad 489 B assign.use.intermediate.rad 191 B assign.use.intermediate.ril 99 B average.rad 189 B average.ril 447 B binding.storage.rad 962 B binop.arith.rad 479 B binop.arith.ril 389 B binop.bitwise.rad 1.2 KiB binop.bitwise.ril 1.2 KiB binop.cmp.rad 425 B binop.logical.rad 216 B binop.logical.ril 373 B binop.shift.rad 197 B binop.shift.ril 149 B binop.unsigned.rad 317 B binop.unsigned.ril 236 B bitmanip.rad 4.5 KiB bool.comparison.array.rad 691 B bool.comparison.nested.gen.rad 1.0 KiB bool.comparison.opt.rad 865 B bool.comparison.record.gen.rad 1.0 KiB bool.comparison.record.rad 1.1 KiB bool.comparison.slice.gen.rad 157 B bool.comparison.slice.rad 4.4 KiB bool.comparison.slice.record.gen.rad 2.0 KiB bool.comparison.slice.union.gen.rad 2.6 KiB bool.comparison.union.ctor.rad 711 B bool.comparison.union.gen.rad 1.2 KiB bool.comparison.union.record.gen.rad 1.5 KiB bool.comparison.union.simple.gen.rad 302 B bool.operators.complex.rad 368 B bool.operators.rad 824 B bool.short.circuit.rad 2.4 KiB bool.simple.rad 202 B bool.values.rad 787 B borrow.fields.calls.rad 1.3 KiB borrow.fields.calls.ril 1.1 KiB borrow.fields.pattern.rad 594 B borrow.fields.pattern.ril 362 B borrow.index.disjoint.rad 2.9 KiB borrow.index.overlap.reject.rad 611 B builtin.alignof.rad 698 B builtin.alignof.ril 287 B builtin.memory.fence.rad 108 B builtin.size.align.rad 1.2 KiB builtin.sizeof.rad 656 B builtin.sizeof.ril 282 B builtin.sliceof.invalid.cap.rad 271 B builtin.sliceof.limit.rad 479 B builtin.sliceof.mut.rad 672 B builtin.sliceof.rad 542 B byte.load.store.rad 380 B byte.load.store.ril 687 B call.aggregate.arg.snapshot.rad 520 B call.arg.clobber.rad 732 B call.basic.rad 256 B call.clobber.rad 509 B call.stack.args.aggregate.rad 603 B call.stack.args.fnptr.rad 1.4 KiB call.stack.args.method.rad 1.4 KiB call.stack.args.mixed.rad 1.6 KiB call.stack.args.recursive.rad 1.0 KiB call.stack.args.spill.rad 1.9 KiB call.stack.args.survive.rad 2.9 KiB call.stack.args.throws.rad 861 B call.tests.rad 764 B call.tests.ril 605 B cast.basic.rad 855 B cast.basic.ril 681 B cast.narrow.rad 583 B cast.narrow.ril 557 B cast.same.size.rad 1.0 KiB cast.same.size.ril 1.1 KiB casting.numbers.rad 1.5 KiB char.literal.rad 180 B cmp.extension.rad 3.1 KiB cmp.narrow.live.rad 1.5 KiB cmp.narrow.live.ril 2.2 KiB cmp.rel.rad 733 B cmp.rel.ril 467 B cmp.unsigned.rad 733 B cmp.unsigned.ril 467 B coercion.implicit.rad 941 B coercion.implicit.ril 1.0 KiB compare.literal.first.u64.rad 301 B compound.assign.field.rad 318 B compound.assign.index.once.rad 431 B compound.assign.rad 1.2 KiB compound.assign.ril 2.0 KiB cond.assign.merge.basic.rad 221 B cond.assign.merge.basic.ril 172 B cond.assign.merge.rad 214 B cond.assign.merge.ril 169 B cond.assign.rad 766 B cond.elseif.rad 204 B cond.elseif.ril 181 B cond.expr.aggregate.rad 1.2 KiB cond.expr.literal-first.rad 326 B cond.expr.rad 1.9 KiB cond.expr.ril 3.5 KiB cond.for.else.break.rad 343 B cond.for.indexed.rad 255 B cond.for.rad 180 B cond.for.range.indexed.rad 549 B cond.for.range.rad 190 B cond.for.unsigned.range.rad 677 B cond.forever.break.continue.rad 197 B cond.forever.break.rad 251 B cond.fused.rad 939 B cond.if.case.rad 2.2 KiB cond.if.else.min.rad 152 B cond.if.else.rad 233 B cond.if.elseif.rad 418 B cond.if.noelse.rad 134 B cond.if.rad 840 B cond.ifelse.rad 104 B cond.ifelse.ril 117 B cond.iflet.case.rad 170 B cond.iflet.case.ril 114 B cond.iflet.guard.rad 182 B cond.iflet.guard.ril 165 B cond.iflet.mut.rad 195 B cond.iflet.mut.ril 223 B cond.iflet.noelse.rad 156 B cond.iflet.noelse.ril 231 B cond.iflet.optional.rad 184 B cond.iflet.optional.ril 197 B cond.iflet.optional.value.rad 194 B cond.iflet.optional.value.ril 212 B cond.letelse.case.rad 158 B cond.letelse.case.ril 149 B cond.letelse.guard.rad 172 B cond.letelse.guard.ril 200 B cond.letelse.mut.rad 185 B cond.letelse.mut.ril 258 B cond.letelse.optional.rad 172 B cond.letelse.optional.ril 232 B cond.match.fallthrough.rad 418 B cond.match.guard.rad 1.4 KiB cond.match.guard.regalloc.rad 1.4 KiB cond.nested.rad 138 B cond.nested.ril 185 B cond.optional.annotation.rad 867 B cond.shortcircuit.eval.rad 1006 B cond.shortcircuit.rad 418 B cond.shortcircuit.ril 484 B cond.simple.rad 86 B cond.simple.ril 118 B cond.while.else.break.rad 299 B cond.while.rad 134 B const-cast-wrap.rad 442 B const-expr-array-size.rad 391 B const-expr-cast.rad 1.1 KiB const-expr-literal.rad 673 B const-expr-refs.rad 872 B const.array.copy.mutate.rad 397 B const.array.ident.rad 247 B const.array.ident.ril 208 B const.array.rad 213 B const.array.record.ident.rad 396 B const.array.record.ident.ril 293 B const.array.repeat.record.rad 225 B const.array.repeat.record.ril 211 B const.array.repeat.string.slice.rad 303 B const.array.repeat.string.slice.ril 1.1 KiB const.array.ril 437 B const.array.strings.slice.rad 274 B const.array.strings.slice.ril 781 B const.basic.rad 341 B const.char.rad 174 B const.fn.array.rad 670 B const.i32.shift.right.rad 244 B const.local.duplicate.rad 474 B const.local.duplicate.ril 866 B const.negative.rad 331 B const.negative.ril 380 B const.record.array.rad 1.2 KiB const.record.array.simple.rad 554 B const.record.ctor.rad 194 B const.record.ctor.ril 448 B const.record.fn.rad 362 B const.record.mutcopy.rad 1.0 KiB const.record.mutcopy.ril 1.4 KiB const.record.nested.rad 408 B const.record.nested.ril 312 B const.record.packed.rad 275 B const.record.packed.ril 204 B const.record.padded.rad 275 B const.record.padded.ril 237 B const.record.rad 204 B const.record.ril 164 B const.record.union.rad 612 B const.record.union.ril 883 B const.scalar.rad 105 B const.scalar.ril 116 B const.shift.negative.count.rad 305 B const.slice.of.slices.rad 238 B const.slice.of.slices.ril 1.2 KiB const.slice.param.rad 339 B const.string.rad 114 B const.string.ril 401 B const.string.scoped.names.rad 263 B const.string.scoped.names.ril 1.0 KiB const.u32.shift.mask.rad 249 B const.u64.compare.rad 188 B const.u64.divide.rad 174 B const.union.nested.mixed.rad 889 B const.union.payload.ctor.rad 376 B const.union.payload.ctor.ril 504 B const.union.payload.fn.array.rad 1.1 KiB const.union.payload.record.array.rad 1.5 KiB const.union.record.literal.rad 383 B const.union.record.literal.ril 550 B constant.mutable.pointer.reject.rad 416 B constant.projections.rad 1.8 KiB data.array.rad 803 B data.bool.rad 237 B data.i16.rad 288 B data.i32.rad 308 B data.i8.rad 275 B data.optional.nil.rad 935 B data.optional.value.rad 2.5 KiB data.record.rad 597 B data.simple.rad 492 B data.u16.rad 244 B data.u32.rad 264 B data.u8.rad 232 B data.union.rad 1.0 KiB debug.tag.rad 563 B definit.aggregates.rad 1.9 KiB definit.branches.rad 3.5 KiB definit.loops.rad 1.9 KiB div.u8.immediate.wrap.rad 213 B ecall.i64.rad 535 B edge.cases.2.rad 361 B edge.cases.3.rad 606 B edge.cases.4.rad 1.3 KiB edge.cases.5.rad 1.1 KiB edge.cases.6.rad 3.0 KiB edge.cases.7.addr.bug.rad 246 B edge.cases.8.bug.rad 553 B edge.cases.rad 246 B entry.storage.call.rad 635 B entry.storage.dict.rad 1.6 KiB entry.storage.noenv.rad 1.6 KiB entry.storage.rad 2.3 KiB entry.storage.record.rad 5.5 KiB entry.storage.reject.rad 4.9 KiB entry.storage.slices.index.rad 346 B entry.storage.slices.lower.rad 616 B entry.storage.slices.lower.ril 904 B entry.storage.slices.rad 4.7 KiB entry.storage.slices.range.rad 441 B entry.storage.small.rad 446 B entry.storage.small.record.rad 432 B entry.storage.small.record.ril 367 B entry.storage.small.ril 641 B entry.storage.split.rad 2.5 KiB error.basic.rad 185 B error.catch.discard.pointer.rad 1.0 KiB error.catch.rad 1.6 KiB error.catch.return.rad 414 B error.catch.return.ril 511 B error.division.zero.rad 164 B error.match.discard.rad 533 B error.modulo.zero.rad 162 B error.multi.basic.rad 721 B error.multi.catch.rad 870 B error.multi.catch.typed.binding.rad 840 B error.multi.catch.typed.catchall.rad 1.1 KiB error.multi.catch.typed.rad 1.1 KiB error.multi.mixed.union.rad 3.0 KiB error.multi.propagate.multi.rad 1010 B error.multi.propagate.rad 874 B error.multi.try.optional.rad 544 B error.slice.bounds.rad 233 B error.throw.coercion.rad 318 B error.try.bang.success.rad 381 B error.try.catch.binding.rad 2.0 KiB error.try.optional.rad 1.9 KiB error.try.rad 4.1 KiB extern.inferred.rad 70 B externfn.rad 32 B externfn.ril 37 B fibonacci.rad 120 B fibonacci.ril 247 B field.aggregate.rad 842 B field.aggregate.ril 934 B fn.block.scope.rad 508 B fn.callback.nested.rad 1.6 KiB fn.default.rad 144 B fn.local.rad 153 B fn.ptr.assign.rad 277 B fn.ptr.assign.ril 180 B fn.ptr.call.rad 258 B fn.ptr.call.ril 217 B fn.ptr.param.rad 356 B fn.ptr.param.ril 319 B fn.recursion.2.rad 237 B fn.void.rad 163 B for.else.continue.rad 1.1 KiB for.record.inner.loop.rad 713 B frame.large.rad 614 B generic.function.growth.reject.rad 284 B generic.function.rad 1.5 KiB generic.layout.overflow.reject.rad 211 B generic.layout.rad 875 B heap.allocator.slots.reject.rad 630 B heap.constant.rad 1.2 KiB heap.forge.handle.reject.rad 440 B heap.forge.local.reject.rad 499 B heap.forge.param.reject.rad 316 B heap.forge.static.reject.rad 351 B heap.rewind.static.rad 328 B heap.static.rad 2.8 KiB if-let-mut.rad 1.2 KiB iflet.shadow.else.rad 408 B iflet.shadow.leak.rad 316 B index.eval.order.rad 395 B index.u8.rad 616 B infer.empty.array.reject.rad 197 B infer.nested.integer.reject.rad 366 B int.default.i64.rad 1.1 KiB integer.bitwise.basic.rad 738 B integer.overflow.rad 1.8 KiB intrinsic.bits.rad 239 B intrinsic.bytes.load16.end.rad 406 B intrinsic.bytes.load16.overflow.rad 415 B intrinsic.bytes.load16.short.rad 406 B intrinsic.bytes.load32.end.rad 406 B intrinsic.bytes.load32.overflow.rad 415 B intrinsic.bytes.load32.short.rad 406 B intrinsic.bytes.load64.end.rad 406 B intrinsic.bytes.load64.overflow.rad 415 B intrinsic.bytes.load64.short.rad 406 B intrinsic.bytes.rad 389 B intrinsic.bytes.store16.end.rad 391 B intrinsic.bytes.store16.overflow.rad 400 B intrinsic.bytes.store16.short.rad 391 B intrinsic.bytes.store32.end.rad 391 B intrinsic.bytes.store32.overflow.rad 400 B intrinsic.bytes.store32.short.rad 391 B intrinsic.bytes.store64.end.rad 391 B intrinsic.bytes.store64.overflow.rad 400 B intrinsic.bytes.store64.short.rad 391 B intrinsic.ebreak.rad 90 B intrinsic.ebreak.ril 51 B intrinsic.ecall.buffer.rad 1.1 KiB intrinsic.ecall.buffer.ril 730 B intrinsic.ecall.rad 171 B intrinsic.ecall.ril 70 B intrinsic.page.heap.rad 1.6 KiB large.blit.store.rad 2.1 KiB layout.fn.rad 771 B layout.fn.ril 1.1 KiB layout.optional.rad 698 B layout.optional.ril 1.1 KiB layout.recursive.rad 816 B layout.recursive.ril 409 B layout.result.rad 782 B layout.result.ril 1.5 KiB layout.slice.rad 1.0 KiB layout.slice.ril 2.1 KiB layout.union.rad 996 B layout.union.ril 1.1 KiB let.case.ref.binding.rad 2.7 KiB let.copy.semantics.rad 883 B let.copy.semantics.ril 1.0 KiB let.guard.rad 1.9 KiB let.placeholder.rad 291 B let.placeholder.ril 262 B linear.let-else.rad 402 B linear.ownership.rad 395 B linear.ownership.ril 362 B linear.reference.rad 663 B linear.reference.ril 736 B linear.unsafe.rad 531 B linear.unsafe.ril 318 B literal.char.rad 209 B literal.char.ril 127 B literal.slice.bytes.rad 124 B literal.slice.bytes.ril 351 B literal.slice.dedup.rad 199 B literal.slice.dedup.ril 485 B literal.slice.empty.rad 100 B literal.slice.empty.ril 212 B literal.slice.multi.rad 170 B literal.slice.multi.ril 580 B literal.slice.rad 123 B literal.slice.record.rad 217 B literal.slice.record.ril 495 B literal.slice.ril 361 B literal.string.dedup.rad 179 B literal.string.dedup.ril 472 B literal.string.empty.rad 93 B literal.string.empty.ril 336 B literal.string.fns.rad 180 B literal.string.fns.ril 524 B literal.string.multi.rad 153 B literal.string.multi.ril 534 B literal.string.rad 108 B literal.string.ril 335 B literal.w64.rad 1.7 KiB load.u32.high.rad 1.8 KiB loc.addr.offset.bug.rad 453 B loc.addr.opt.to.opt.rad 454 B loc.addr.optional.assign.rad 429 B loc.addr.record.assign.rad 497 B local.multi.rad 85 B local.multi.ril 67 B local.mut.rad 79 B local.mut.ril 45 B local.simple.rad 60 B local.simple.ril 45 B loop.break.rad 156 B loop.break.ril 228 B loop.complex.flow.rad 1.0 KiB loop.continue.rad 219 B loop.continue.ril 327 B loop.for.array.rad 223 B loop.for.array.ril 371 B loop.for.break.bound.rad 163 B loop.for.break.bound.ril 264 B loop.for.continue.rad 405 B loop.for.continue.ril 797 B loop.for.indexed.rad 151 B loop.for.indexed.ril 285 B loop.for.placeholder.rad 323 B loop.for.placeholder.ril 502 B loop.for.pointer.rad 1.5 KiB loop.for.rad 122 B loop.for.ril 220 B loop.for.slice.indexed.offset.bounds.rad 275 B loop.for.slice.indexed.other.bounds.rad 345 B loop.for.slice.indexed.rad 209 B loop.for.slice.indexed.ril 446 B loop.for.slice.indexed.runtime.rad 1.2 KiB loop.for.slice.indexed.shadow.bounds.rad 296 B loop.for.slice.indexed.source.shadow.bounds.rad 346 B loop.for.slice.pointer.bound.rad 190 B loop.for.slice.pointer.bound.ril 415 B loop.for.slice.rad 216 B loop.for.slice.ril 431 B loop.for.unsigned.range.rad 321 B loop.for.unsigned.range.ril 481 B loop.infinite.rad 41 B loop.infinite.ril 105 B loop.mutable.rad 377 B loop.mutable.ril 569 B loop.nested.break.rad 392 B loop.nested.break.ril 461 B loop.nested.continue.rad 418 B loop.nested.continue.ril 581 B loop.return.rad 141 B loop.return.ril 206 B loop.sealblock.rad 946 B loop.while.false.noparams.rad 170 B loop.while.false.noparams.ril 171 B loop.while.nested.shortcircuit.rad 872 B loop.while.nested.shortcircuit.ril 429 B loop.while.rad 164 B loop.while.ril 241 B loop.whilelet.case.rad 259 B loop.whilelet.case.ril 204 B loop.whilelet.guard.rad 265 B loop.whilelet.guard.ril 256 B loop.whilelet.optional.rad 212 B loop.whilelet.optional.ril 293 B loop.whilelet.union.rad 387 B loop.whilelet.union.ril 444 B lower.const.record.ident.rad 291 B lower.const.record.ident.ril 635 B lower.private.union.const.rad 259 B lower.private.union.const.ril 528 B lower.record.scalar.record.const.rad 244 B lower.record.scalar.record.const.ril 561 B lower.slice.strings.names.rad 462 B match.alternatives.il.rad 1.1 KiB match.alternatives.il.ril 2.0 KiB match.alternatives.nested.rad 9.2 KiB match.alternatives.subject.rad 10.1 KiB match.array.rad 3.5 KiB match.borrow.scope.rad 797 B match.byref.scalar.rad 5.9 KiB match.catchall.reject.rad 660 B match.char.rad 1.7 KiB match.last.prong.il.rad 1.5 KiB match.last.prong.il.ril 1.6 KiB match.last.prong.rad 4.0 KiB match.many.rad 1.6 KiB match.more.rad 667 B match.more.ril 778 B match.multi.seal.rad 1011 B match.multi.seal.ril 848 B match.multi.survive.rad 1.6 KiB match.mutref.push.rad 1.1 KiB match.mutref.union.rad 691 B match.nested.call.rad 1.8 KiB match.nested.deep.rad 2.2 KiB match.nested.deref.rad 3.8 KiB match.nested.enum.byref.rad 27.3 KiB match.nested.guard.field.rad 1.0 KiB match.nested.guard.field.safe.rad 1.9 KiB match.nested.guard.rad 1.6 KiB match.nested.iflet.guard.rad 1.6 KiB match.nested.iflet.rad 1.4 KiB match.nested.iflet.ril 2.3 KiB match.nested.letelse.rad 848 B match.nested.letelse.union.rad 1.4 KiB match.nested.literal.rad 3.1 KiB match.nested.multi.rad 2.5 KiB match.nested.pattern.rad 5.3 KiB match.nested.pattern.ril 8.1 KiB match.nested.record.rad 2.1 KiB match.nested.record.ril 3.4 KiB match.nested.scalar.byref.rad 15.3 KiB match.nested.union.rad 2.3 KiB match.nested.union.ril 4.5 KiB match.nested.whilelet.rad 2.4 KiB match.optional.aggregate.rad 230 B match.optional.aggregate.ril 607 B match.optional.rad 190 B match.optional.record.pattern.rad 14.1 KiB match.optional.record.rad 294 B match.optional.record.ril 369 B match.optional.ref.rad 215 B match.optional.ref.ril 328 B match.optional.ril 268 B match.optional.union.variant.rad 303 B match.optional.union.variant.ril 385 B match.optional.wildcard.rad 282 B match.record.pattern.rad 349 B match.record.pattern.ril 302 B match.record.positional.fields.rad 5.1 KiB match.scalar.extension.rad 1.6 KiB match.simple.rad 375 B match.simple.ril 392 B match.string.rad 1.9 KiB match.subject.inplace.eval.rad 1.9 KiB match.subject.inplace.rad 1.6 KiB match.subject.inplace.ril 2.4 KiB match.switch.dense.rad 3.6 KiB match.switch.rad 219 B match.switch.ril 207 B match.union.switch.rad 3.8 KiB match.value.copy.rad 2.0 KiB match.variant.fields.bind.rad 6.3 KiB match.variant.fields.deref.rad 1.6 KiB match.variant.fields.literal.rad 5.0 KiB match.variant.fields.nested.rad 7.0 KiB match.variant.fields.optional.rad 4.6 KiB match.variant.fields.rad 459 B match.variant.fields.ref.rad 3.2 KiB match.variant.fields.reject.rad 372 B match.variant.fields.ril 835 B match.void.then.or.rad 1.6 KiB match.wildcard.literal.rad 3.5 KiB match.wildcard.switch.rad 403 B match.wildcard.switch.ril 297 B match.wildcard.union.rad 1.7 KiB memzero.result.bug.rad 820 B memzero.union.bug.rad 617 B method.basic.rad 590 B method.eight.params.rad 1.4 KiB method.eight.params.throws.rad 2.3 KiB method.multiple.rad 945 B method.ptr.rad 717 B method.pub.rad 247 B method.return.rad 472 B method.scalar.receiver.rad 920 B method.throws.rad 849 B method.union.rad 447 B method.with.trait.rad 706 B mixedtypes.rad 79 B mixedtypes.ril 82 B multi.throw.basic.rad 294 B multi.throw.basic.ril 395 B multi.throw.catch.typed.rad 466 B multi.throw.catch.typed.ril 830 B multi.throw.propagate.rad 357 B multi.throw.propagate.ril 697 B multiplefns.rad 109 B multiplefns.ril 147 B mutable.data.plain.rad 1.7 KiB mutable.data.slice.reject.rad 992 B mutable.static.slice.reject.rad 404 B mutref.call.result.rad 350 B mutref.loop.bug.rad 1.9 KiB mutref.loop.rad 324 B mutref.loop.ril 412 B mutref.scalar.rad 232 B mutref.scalar.ril 366 B nil.cmp.rad 622 B nil.cmp.ril 556 B noparams.rad 38 B noparams.ril 43 B opt.array.hint.rad 951 B opt.assignment.bug.rad 1.3 KiB opt.bug.test.rad 1.4 KiB opt.if.let.complex.rad 6.1 KiB opt.if.let.guard.rad 801 B opt.if.let.rad 948 B opt.nil.check.rad 1.6 KiB opt.ptr.return.nil.rad 85 B opt.ptr.return.nil.ril 104 B opt.record.eq.rad 864 B opt.record.eq.rev.rad 313 B opt.record.eq.rev.ril 593 B opt.record.eq.ril 3.5 KiB opt.record.rad 677 B opt.return.array.rad 289 B opt.return.nested.rad 803 B opt.return.nil.rad 82 B opt.return.nil.ril 156 B opt.return.record.rad 351 B opt.return.value.rad 91 B opt.return.value.ril 180 B opt.slice.npo.rad 3.0 KiB opt.slice.npo.ril 6.8 KiB opt.type.rad 227 B opt.while.let.complex.rad 411 B optional.aggregate.eq.rad 292 B optional.aggregate.eq.ril 825 B optional.array.repeat.rad 2.9 KiB optional.array.repeat.static.rad 833 B optional.const.scalar.rad 2.6 KiB optional.const.string.rad 340 B optional.eq.rad 131 B optional.eq.ril 311 B optional.field.value.match.rad 628 B optional.let.literal.rad 1.5 KiB optional.pointer.wide.rad 875 B optional.pointer.wide.ril 1.1 KiB optional.ptr.eq.rad 313 B optional.ptr.eq.ril 477 B optional.record.value.match.rad 645 B optional.union.eq.rad 1.5 KiB optional.union.init.rad 2.5 KiB optional.union.let.rad 2.9 KiB optional.union.variant.cond.rad 2.5 KiB optional.union.variant.exhaustive.rad 2.0 KiB optional.union.variant.match.rad 2.4 KiB optional.union.variant.nested.rad 1.5 KiB optional.union.variant.owned.rad 1.3 KiB optional.union.variant.placeholder.rad 408 B optional.union.variant.record.rad 2.9 KiB optional.union.variant.ref.rad 1.4 KiB optional.union.variant.void.rad 1.3 KiB owned.root.fields.rad 1.8 KiB panic.basic.rad 70 B panic.basic.ril 46 B panic.rad 111 B param.address.loop.rad 423 B parser.call.record.argument.rad 209 B parser.condition.array.record.rad 232 B parser.condition.subscript.record.rad 278 B parser.keyword.reject.rad 206 B placeholder.basic.rad 147 B placeholder.comprehensive.rad 578 B placeholder.value.reject.rad 510 B pointer.arithmetic.unsafe.rad 465 B pointer.borrow.unsafe.rad 1.7 KiB pointer.cast.unsafe.rad 475 B pointer.copy.edge.case.rad 1.5 KiB pointer.move.record.rad 570 B pointer.nonnull.rad 1.7 KiB pointer.nonnull.ril 3.3 KiB pointer.slice.index.rad 302 B pointer.slice.store.rad 1005 B pointer.stack.borrow.rad 954 B pointer.stack.unsafe.rad 517 B pointer.zero.trap.rad 407 B pointerfn.rad 50 B pointerfn.ril 112 B prog.ackermann.rad 5.0 KiB prog.bignum.rad 9.7 KiB prog.binsearch.rad 2.5 KiB prog.bubblesort.rad 2.0 KiB prog.cordic.rad 6.9 KiB prog.crc32.rad 2.8 KiB prog.dijkstra.rad 8.0 KiB prog.eval.rad 6.3 KiB prog.hanoi.rad 3.8 KiB prog.huffman.rad 9.8 KiB prog.hybridsort.rad 3.1 KiB prog.linkedlist.rad 5.9 KiB prog.lzw.rad 7.2 KiB prog.matmul.rad 3.0 KiB prog.mersenne.rad 5.5 KiB prog.nqueens.rad 3.6 KiB prog.rbtree.rad 8.8 KiB prog.regex.rad 11.0 KiB prog.sha256.rad 7.2 KiB prog.sieve.rad 2.8 KiB prog.symtab.rad 10.3 KiB prog.tokenizer.rad 14.8 KiB prog.vm.rad 18.2 KiB ptr.addressof.field.rad 138 B ptr.addressof.field.ril 163 B ptr.addressof.local.rad 501 B ptr.addressof.local.ril 353 B ptr.addressof.rad 133 B ptr.addressof.ril 163 B ptr.assign.rad 155 B ptr.assign.ril 159 B ptr.deref.rad 720 B ptr.deref.record.rad 288 B ptr.deref.record.ril 250 B ptr.deref.ril 1.1 KiB ptr.eq.rad 1.1 KiB ptr.mutate.rad 256 B ptr.opaque.rad 1.6 KiB ptr.subscript.assign.rad 133 B ptr.subscript.assign.ril 229 B range.arithmetic.rad 897 B record.access.rad 304 B record.alignment.rad 200 B record.array.elements.rad 1.7 KiB record.assign.blit.rad 121 B record.assign.blit.ril 193 B record.copy.rad 2.1 KiB record.ctor.tuple.rad 75 B record.ctor.tuple.ril 248 B record.empty.eq.rad 278 B record.empty.eq.ril 312 B record.eq.rad 229 B record.eq.ril 272 B record.field.assign.rad 215 B record.field.assign.ril 337 B record.literal.labeled.rad 109 B record.literal.labeled.ril 157 B record.mixed.layout.rad 122 B record.mixed.layout.ril 179 B record.nested.calls.2.rad 622 B record.nested.calls.3.rad 755 B record.nested.eq.rad 258 B record.nested.eq.ril 638 B record.nested.lit.rad 182 B record.nested.lit.ril 249 B record.nodeid.cheap.rad 1.1 KiB record.nodeid.cheap.ril 1.5 KiB record.param.lit.rad 379 B record.positional.destructure.rad 1.1 KiB record.ptr.access.rad 260 B record.ptr.access.ril 227 B record.ptr.mutate.rad 249 B record.scalar.rad 10.7 KiB record.shorthand.rad 1.5 KiB record.single.deref.rad 1.6 KiB record.unlabeled.deref.rad 1.4 KiB record.unlabeled.rad 419 B ref.if.bug.rad 527 B ref.immut.loop.bug.rad 674 B ref.local.bindings.rad 1.5 KiB ref.local.bindings.ril 1.2 KiB ref.local.fields.rad 1.8 KiB ref.local.never.rad 269 B ref.local.never.ril 124 B ref.local.scopes.rad 1.1 KiB ref.local.scopes.ril 1023 B ref.local.slice.release.rad 288 B ref.local.slice.release.ril 654 B ref.mut.ptr.rad 291 B reference.array.repeat.rad 133 B reference.array.repeat.ril 360 B regalloc.callee.save.rad 1.5 KiB regalloc.spill.reuse.rad 488 B region.buffered.rad 6.1 KiB region.cursor.implicit.rad 1.1 KiB region.empty.rad 1.4 KiB region.heap.rad 2.1 KiB region.http.rad 5.9 KiB region.iterator.rad 2.5 KiB region.mutable.views.escape.reject.rad 463 B region.mutable.views.rad 588 B region.nested.rad 2.7 KiB region.record.rad 4.4 KiB region.return.rad 5.4 KiB region.slice.rad 1.5 KiB region.sources.rad 3.6 KiB region.stores.rad 2.8 KiB region.union.variants.rad 1.3 KiB region.unknown.join.reject.rad 456 B region.unnamed.optional.reject.rad 230 B region.unnamed.rad 1.5 KiB region.unnamed.slice.reject.rad 234 B region.writer.rad 2.8 KiB reserve.loop.rad 421 B reserve.loop.ril 502 B reserve.zeroed.rad 1.2 KiB result.slice.rad 1.7 KiB result.void.success.rad 699 B return.lit.rad 45 B return.lit.ril 50 B return.never.catch.rad 794 B return.never.flow.rad 647 B return.never.flow.ril 607 B return.param.rad 48 B return.param.ril 54 B rv64.u32.compare.rad 2.1 KiB scope.local.overflow.reject.rad 842 B scratch.forge.opaque.rad 698 B scratch.frame.rad 3.3 KiB scratch.slots.reject.rad 650 B scratch.stale.values.rad 1.7 KiB set.keyword.rad 446 B simplefn.rad 45 B simplefn.ril 51 B slice.alloc.loop.rad 850 B slice.append.failure.rad 1.1 KiB slice.append.limit.rad 915 B slice.append.limit.trap.rad 369 B slice.append.rad 586 B slice.append.ril 1.5 KiB slice.append.values.rad 3.4 KiB slice.append.zero.rad 1.3 KiB slice.assign.mismatch.rad 220 B slice.assign.rad 2.2 KiB slice.basic.rad 763 B slice.basic.ril 1.3 KiB slice.borrow.coerce.rad 1.4 KiB slice.cap.rad 996 B slice.construct.unsafe.rad 468 B slice.delete.bounds.rad 288 B slice.delete.owned.rad 420 B slice.delete.rad 1009 B slice.delete.ril 4.4 KiB slice.delete.slots.rad 1.2 KiB slice.elem.bounds.rad 271 B slice.empty.nonnull.rad 1.9 KiB slice.empty.suffix.rad 599 B slice.eq.rad 126 B slice.eq.ril 330 B slice.extend.borrowed.rad 6.7 KiB slice.extend.bytes.rad 892 B slice.extend.bytes.ril 3.2 KiB slice.extend.copy.rad 24.0 KiB slice.extend.overflow.rad 1.1 KiB slice.extend.overflow.words.rad 1.1 KiB slice.failure.rad 2.6 KiB slice.grow.rad 6.7 KiB slice.header.unsafe.rad 629 B slice.index.rad 104 B slice.index.ril 220 B slice.mutable.rad 297 B slice.mutable.ril 696 B slice.mutator.place.reject.rad 1.3 KiB slice.new.bounds.rad 258 B slice.new.order.rad 258 B slice.of.rad 560 B slice.owned.return.const.rad 1.5 KiB slice.param.grow.rad 4.0 KiB slice.param.lent.rad 1.6 KiB slice.ptr.checked.bounds.rad 228 B slice.ptr.unsafe.rad 680 B slice.range.bounds.check.rad 301 B slice.range.capacity.bounds.rad 349 B slice.range.capacity.rad 1.8 KiB slice.range.dynamic.rad 883 B slice.range.order.check.rad 300 B slice.range.rad 682 B slice.range.ril 2.2 KiB slice.reserve.limit.rad 722 B slice.reserve.overflow.rad 1.6 KiB slice.reserve.rad 2.2 KiB slice.reserve.result.rad 634 B slice.reserve.result.ril 1.1 KiB slice.resize.extend.rad 793 B slice.resize.extend.ril 2.8 KiB slice.resize.fill.snapshot.rad 1.5 KiB slice.runtime.i32.rad 279 B slice.runtime.i32.ril 873 B slice.runtime.literal.rad 271 B slice.runtime.literal.ril 564 B slice.sizes.rad 13.1 KiB slice.sub.bounds.rad 407 B slice.sub.order.rad 357 B slice.sub.values.rad 1.1 KiB slice.subslice.rad 1.5 KiB slice.take.control.rad 1.4 KiB slice.take.lower.rad 410 B slice.take.lower.ril 351 B slice.take.neighbors.rad 1.8 KiB slice.take.rad 1.9 KiB slice.take.sizes.rad 2.7 KiB slice.zero-sized.limit.rad 345 B slice.zero-sized.rad 1.6 KiB spill.blockarg.clobber.rad 3.6 KiB spill.loop.rad 1.7 KiB stack.local.corrupt.rad 335 B static.array.mutate.rad 441 B static.assign.rad 138 B static.assign.ril 278 B static.basic.rad 361 B static.empty.slice.optional.rad 902 B static.fn.array.rad 628 B static.local.decl.rad 208 B static.local.decl.ril 458 B static.move.reject.rad 566 B static.mutation.reject.rad 3.4 KiB static.optional.nil.rad 1.0 KiB static.owned.alias.reject.rad 499 B static.record.array.rad 546 B static.reference.call.reject.rad 984 B static.scalar.rad 109 B static.scalar.ril 169 B static.slice.empty.rad 375 B static.slice.empty.record.table.rad 2.4 KiB static.slice.empty.ril 729 B static.slice.empty.table.rad 1.6 KiB static.slice.index.assign.rad 450 B static.slice.offset.rad 719 B static.zero.bss.rad 1.1 KiB static.zero.record.repeat.rad 759 B static.zero.record.repeat.ril 581 B string.basic.rad 162 B string.escape.rad 364 B string.index.rad 129 B switch.blockargs.clobber.rad 1.4 KiB trait.aggregate.ret.rad 1.7 KiB trait.array.optional.rad 1.8 KiB trait.basic.rad 632 B trait.control.flow.rad 1.2 KiB trait.dispatch.rad 333 B trait.dispatch.ril 801 B trait.fn.param.rad 1.8 KiB trait.multiple.methods.rad 1.3 KiB trait.multiple.traits.rad 1.3 KiB trait.multiple.types.rad 1.4 KiB trait.object.narrow.rad 1.7 KiB trait.object.rad 408 B trait.object.ril 642 B trait.optional.coerce.rad 1.0 KiB trait.param.names.shared.rad 759 B trait.supertrait.forward.rad 693 B trait.supertrait.rad 2.7 KiB trait.supertrait.ril 4.0 KiB trait.throws.rad 1.0 KiB trait.type.local.reject.rad 357 B trait.type.scoped.reject.rad 333 B trait.writer.rad 2.8 KiB trivial.phi.rad 1.1 KiB trivial.phi.ril 512 B try.basic.rad 402 B try.basic.ril 702 B try.catch.rad 350 B try.catch.ril 637 B try.optional.rad 374 B try.optional.ril 736 B try.panic.rad 362 B try.panic.ril 516 B try.reference.rad 911 B try.reference.ril 2.0 KiB type.unify.rad 4.7 KiB undefined.aggregate.rad 165 B undefined.aggregate.ril 114 B undefined.bitvalid.rad 2.7 KiB undefined.merge.dominance.rad 1.1 KiB undefined.merge.dominance.ril 934 B undefined.merge.one.path.rad 197 B undefined.merge.one.path.ril 119 B undefined.merge.pointer.rad 661 B undefined.merge.rad 1.9 KiB undefined.primitive.rad 122 B undefined.primitive.ril 48 B undefined.rad 459 B undefined.record.field.rad 1.6 KiB undefined.record.field.ril 849 B undefined.unsafe.rad 868 B union-tag.rad 967 B union.bitfield.rad 1.2 KiB union.ctor.rad 574 B union.ctor.ril 509 B union.discriminant.cast.rad 391 B union.edge.case.2.rad 699 B union.edge.case.3.rad 674 B union.eq.rad 827 B union.eq.ril 1.5 KiB union.eq.void.ctor.rad 389 B union.eq.void.ctor.ril 131 B union.eq.void.rad 189 B union.eq.void.ril 75 B union.match.bind.rad 275 B union.match.bind.ril 256 B union.match.ref.rad 1.1 KiB union.match.ref.ril 1.3 KiB union.match.tag.rad 910 B union.match.tag.ril 821 B union.mixed.alias.rad 1.1 KiB union.mixed.assign.rad 1002 B union.mixed.rad 9.9 KiB union.mixed.snapshot.rad 1.7 KiB union.payload.mutref.rad 1.5 KiB union.payload.rad 666 B union.payload.record.eq.rad 304 B union.payload.record.eq.ril 1.0 KiB union.record.forward.rad 1.3 KiB union.record.literal.rad 457 B union.record.literal.ril 418 B union.variant.access.rad 753 B union.variant.access.ril 692 B union.variants.limit.reject.rad 1.4 KiB union.variants.max.rad 1.3 KiB union.void.call.rad 1.5 KiB union.void.match.rad 427 B union.void.rad 969 B unop.rad 701 B unop.ril 506 B unsafe.block.bounds.rad 268 B unsafe.block.rad 866 B unsafe.static.rad 535 B unsigned.compare.rad 1.8 KiB var.align.rad 996 B var.infer.rad 574 B var.shadow.rad 244 B var.shadow.ril 145 B void.throw.rad 281 B void.throw.ril 601 B voidfn.rad 18 B voidfn.ril 44 B trap/ verify/ Makefile 9.2 KiB kernel.rad 776 B runner.rad 11.6 KiB vim/ .gitignore 333 B .gitsigners 224 B AGENTS.md 8.3 KiB CONTRIBUTING 2.1 KiB LICENSE 1.1 KiB Makefile 2.5 KiB README 3.4 KiB STYLE 3.2 KiB std.lib 2.1 KiB std.lib.test 1.1 KiB
test/tests/array.repeat.word.rad 53.8 KiB raw
1
//! returns: 0
2
//! Array repeat literals of more than 32 scalar elements fill whole words and then the remaining
3
//! elements. The items are `u8`, `u16`, `u32`, and `u64` constants (zero, all ones, a mixed
4
//! pattern) and run-time values, for lengths around the word and chunk boundaries. Arrays inside
5
//! records start at an offset that is not a multiple of 8. Signed, boolean, scalar record, void
6
//! union, and function pointer items check the replicated bit pattern.
7
8
/// Number of stack bytes that `dirty` overwrites, as 32-bit words.
9
constant DIRTY_WORDS: u32 = 20000;
10
11
/// Check that every byte of a guard array still holds the value it was created with.
12
fn intact(guard: &[u8]) -> bool {
13
    for x in guard {
14
        if x <> 0x77 {
15
            return false;
16
        }
17
    }
18
    return true;
19
}
20
21
/// Overwrite the stack below the caller with values that no check expects. The next call that the
22
/// caller makes uses this stack, so its arrays start with these bytes.
23
fn dirty(seed: u32) -> u32 {
24
    let mut d: [u32; DIRTY_WORDS] = [0; DIRTY_WORDS];
25
    for i in 0 .. DIRTY_WORDS {
26
        set d[i] = 0xDEADBEEF + seed + i;
27
    }
28
    return d[seed % DIRTY_WORDS];
29
}
30
31
// U8 //
32
33
/// Build a run-time `u8` value with the high bit set.
34
fn mkU8(seed: u32) -> u8 {
35
    return (0x80 + seed * 7 + 1) as u8;
36
}
37
38
/// Check that every element of `items` equals `v`.
39
fn allU8(items: &[u8], v: u8) -> bool {
40
    for x in items {
41
        if x <> v {
42
            return false;
43
        }
44
    }
45
    return true;
46
}
47
48
/// Fill `[u8; 33]` arrays from constants and a run-time value, and check the elements and the
49
/// guards.
50
fn fillU8_33(seed: u32) -> i32 {
51
    let v = mkU8(seed);
52
    let before: [u8; 8] = [0x77; 8];
53
    let zero: [u8; 33] = [0; 33];
54
    let ones: [u8; 33] = [0xff; 33];
55
    let mid: [u8; 33] = [0x5a; 33];
56
    let run: [u8; 33] = [v; 33];
57
    let after: [u8; 8] = [0x77; 8];
58
    if not allU8(&zero[..], 0) {
59
        return 1;
60
    }
61
    if not allU8(&ones[..], 0xff) {
62
        return 2;
63
    }
64
    if not allU8(&mid[..], 0x5a) {
65
        return 3;
66
    }
67
    if not allU8(&run[..], v) {
68
        return 4;
69
    }
70
    if not intact(&before[..]) or not intact(&after[..]) {
71
        return 5;
72
    }
73
    return 0;
74
}
75
76
/// Fill `[u8; 34]` arrays from constants and a run-time value, and check the elements and the
77
/// guards.
78
fn fillU8_34(seed: u32) -> i32 {
79
    let v = mkU8(seed);
80
    let before: [u8; 8] = [0x77; 8];
81
    let zero: [u8; 34] = [0; 34];
82
    let ones: [u8; 34] = [0xff; 34];
83
    let mid: [u8; 34] = [0x5a; 34];
84
    let run: [u8; 34] = [v; 34];
85
    let after: [u8; 8] = [0x77; 8];
86
    if not allU8(&zero[..], 0) {
87
        return 1;
88
    }
89
    if not allU8(&ones[..], 0xff) {
90
        return 2;
91
    }
92
    if not allU8(&mid[..], 0x5a) {
93
        return 3;
94
    }
95
    if not allU8(&run[..], v) {
96
        return 4;
97
    }
98
    if not intact(&before[..]) or not intact(&after[..]) {
99
        return 5;
100
    }
101
    return 0;
102
}
103
104
/// Fill `[u8; 35]` arrays from constants and a run-time value, and check the elements and the
105
/// guards.
106
fn fillU8_35(seed: u32) -> i32 {
107
    let v = mkU8(seed);
108
    let before: [u8; 8] = [0x77; 8];
109
    let zero: [u8; 35] = [0; 35];
110
    let ones: [u8; 35] = [0xff; 35];
111
    let mid: [u8; 35] = [0x5a; 35];
112
    let run: [u8; 35] = [v; 35];
113
    let after: [u8; 8] = [0x77; 8];
114
    if not allU8(&zero[..], 0) {
115
        return 1;
116
    }
117
    if not allU8(&ones[..], 0xff) {
118
        return 2;
119
    }
120
    if not allU8(&mid[..], 0x5a) {
121
        return 3;
122
    }
123
    if not allU8(&run[..], v) {
124
        return 4;
125
    }
126
    if not intact(&before[..]) or not intact(&after[..]) {
127
        return 5;
128
    }
129
    return 0;
130
}
131
132
/// Fill `[u8; 36]` arrays from constants and a run-time value, and check the elements and the
133
/// guards.
134
fn fillU8_36(seed: u32) -> i32 {
135
    let v = mkU8(seed);
136
    let before: [u8; 8] = [0x77; 8];
137
    let zero: [u8; 36] = [0; 36];
138
    let ones: [u8; 36] = [0xff; 36];
139
    let mid: [u8; 36] = [0x5a; 36];
140
    let run: [u8; 36] = [v; 36];
141
    let after: [u8; 8] = [0x77; 8];
142
    if not allU8(&zero[..], 0) {
143
        return 1;
144
    }
145
    if not allU8(&ones[..], 0xff) {
146
        return 2;
147
    }
148
    if not allU8(&mid[..], 0x5a) {
149
        return 3;
150
    }
151
    if not allU8(&run[..], v) {
152
        return 4;
153
    }
154
    if not intact(&before[..]) or not intact(&after[..]) {
155
        return 5;
156
    }
157
    return 0;
158
}
159
160
/// Fill `[u8; 37]` arrays from constants and a run-time value, and check the elements and the
161
/// guards.
162
fn fillU8_37(seed: u32) -> i32 {
163
    let v = mkU8(seed);
164
    let before: [u8; 8] = [0x77; 8];
165
    let zero: [u8; 37] = [0; 37];
166
    let ones: [u8; 37] = [0xff; 37];
167
    let mid: [u8; 37] = [0x5a; 37];
168
    let run: [u8; 37] = [v; 37];
169
    let after: [u8; 8] = [0x77; 8];
170
    if not allU8(&zero[..], 0) {
171
        return 1;
172
    }
173
    if not allU8(&ones[..], 0xff) {
174
        return 2;
175
    }
176
    if not allU8(&mid[..], 0x5a) {
177
        return 3;
178
    }
179
    if not allU8(&run[..], v) {
180
        return 4;
181
    }
182
    if not intact(&before[..]) or not intact(&after[..]) {
183
        return 5;
184
    }
185
    return 0;
186
}
187
188
/// Fill `[u8; 38]` arrays from constants and a run-time value, and check the elements and the
189
/// guards.
190
fn fillU8_38(seed: u32) -> i32 {
191
    let v = mkU8(seed);
192
    let before: [u8; 8] = [0x77; 8];
193
    let zero: [u8; 38] = [0; 38];
194
    let ones: [u8; 38] = [0xff; 38];
195
    let mid: [u8; 38] = [0x5a; 38];
196
    let run: [u8; 38] = [v; 38];
197
    let after: [u8; 8] = [0x77; 8];
198
    if not allU8(&zero[..], 0) {
199
        return 1;
200
    }
201
    if not allU8(&ones[..], 0xff) {
202
        return 2;
203
    }
204
    if not allU8(&mid[..], 0x5a) {
205
        return 3;
206
    }
207
    if not allU8(&run[..], v) {
208
        return 4;
209
    }
210
    if not intact(&before[..]) or not intact(&after[..]) {
211
        return 5;
212
    }
213
    return 0;
214
}
215
216
/// Fill `[u8; 39]` arrays from constants and a run-time value, and check the elements and the
217
/// guards.
218
fn fillU8_39(seed: u32) -> i32 {
219
    let v = mkU8(seed);
220
    let before: [u8; 8] = [0x77; 8];
221
    let zero: [u8; 39] = [0; 39];
222
    let ones: [u8; 39] = [0xff; 39];
223
    let mid: [u8; 39] = [0x5a; 39];
224
    let run: [u8; 39] = [v; 39];
225
    let after: [u8; 8] = [0x77; 8];
226
    if not allU8(&zero[..], 0) {
227
        return 1;
228
    }
229
    if not allU8(&ones[..], 0xff) {
230
        return 2;
231
    }
232
    if not allU8(&mid[..], 0x5a) {
233
        return 3;
234
    }
235
    if not allU8(&run[..], v) {
236
        return 4;
237
    }
238
    if not intact(&before[..]) or not intact(&after[..]) {
239
        return 5;
240
    }
241
    return 0;
242
}
243
244
/// Fill `[u8; 40]` arrays from constants and a run-time value, and check the elements and the
245
/// guards.
246
fn fillU8_40(seed: u32) -> i32 {
247
    let v = mkU8(seed);
248
    let before: [u8; 8] = [0x77; 8];
249
    let zero: [u8; 40] = [0; 40];
250
    let ones: [u8; 40] = [0xff; 40];
251
    let mid: [u8; 40] = [0x5a; 40];
252
    let run: [u8; 40] = [v; 40];
253
    let after: [u8; 8] = [0x77; 8];
254
    if not allU8(&zero[..], 0) {
255
        return 1;
256
    }
257
    if not allU8(&ones[..], 0xff) {
258
        return 2;
259
    }
260
    if not allU8(&mid[..], 0x5a) {
261
        return 3;
262
    }
263
    if not allU8(&run[..], v) {
264
        return 4;
265
    }
266
    if not intact(&before[..]) or not intact(&after[..]) {
267
        return 5;
268
    }
269
    return 0;
270
}
271
272
/// Fill `[u8; 41]` arrays from constants and a run-time value, and check the elements and the
273
/// guards.
274
fn fillU8_41(seed: u32) -> i32 {
275
    let v = mkU8(seed);
276
    let before: [u8; 8] = [0x77; 8];
277
    let zero: [u8; 41] = [0; 41];
278
    let ones: [u8; 41] = [0xff; 41];
279
    let mid: [u8; 41] = [0x5a; 41];
280
    let run: [u8; 41] = [v; 41];
281
    let after: [u8; 8] = [0x77; 8];
282
    if not allU8(&zero[..], 0) {
283
        return 1;
284
    }
285
    if not allU8(&ones[..], 0xff) {
286
        return 2;
287
    }
288
    if not allU8(&mid[..], 0x5a) {
289
        return 3;
290
    }
291
    if not allU8(&run[..], v) {
292
        return 4;
293
    }
294
    if not intact(&before[..]) or not intact(&after[..]) {
295
        return 5;
296
    }
297
    return 0;
298
}
299
300
/// Fill `[u8; 47]` arrays from constants and a run-time value, and check the elements and the
301
/// guards.
302
fn fillU8_47(seed: u32) -> i32 {
303
    let v = mkU8(seed);
304
    let before: [u8; 8] = [0x77; 8];
305
    let zero: [u8; 47] = [0; 47];
306
    let ones: [u8; 47] = [0xff; 47];
307
    let mid: [u8; 47] = [0x5a; 47];
308
    let run: [u8; 47] = [v; 47];
309
    let after: [u8; 8] = [0x77; 8];
310
    if not allU8(&zero[..], 0) {
311
        return 1;
312
    }
313
    if not allU8(&ones[..], 0xff) {
314
        return 2;
315
    }
316
    if not allU8(&mid[..], 0x5a) {
317
        return 3;
318
    }
319
    if not allU8(&run[..], v) {
320
        return 4;
321
    }
322
    if not intact(&before[..]) or not intact(&after[..]) {
323
        return 5;
324
    }
325
    return 0;
326
}
327
328
/// Fill `[u8; 48]` arrays from constants and a run-time value, and check the elements and the
329
/// guards.
330
fn fillU8_48(seed: u32) -> i32 {
331
    let v = mkU8(seed);
332
    let before: [u8; 8] = [0x77; 8];
333
    let zero: [u8; 48] = [0; 48];
334
    let ones: [u8; 48] = [0xff; 48];
335
    let mid: [u8; 48] = [0x5a; 48];
336
    let run: [u8; 48] = [v; 48];
337
    let after: [u8; 8] = [0x77; 8];
338
    if not allU8(&zero[..], 0) {
339
        return 1;
340
    }
341
    if not allU8(&ones[..], 0xff) {
342
        return 2;
343
    }
344
    if not allU8(&mid[..], 0x5a) {
345
        return 3;
346
    }
347
    if not allU8(&run[..], v) {
348
        return 4;
349
    }
350
    if not intact(&before[..]) or not intact(&after[..]) {
351
        return 5;
352
    }
353
    return 0;
354
}
355
356
/// Fill `[u8; 49]` arrays from constants and a run-time value, and check the elements and the
357
/// guards.
358
fn fillU8_49(seed: u32) -> i32 {
359
    let v = mkU8(seed);
360
    let before: [u8; 8] = [0x77; 8];
361
    let zero: [u8; 49] = [0; 49];
362
    let ones: [u8; 49] = [0xff; 49];
363
    let mid: [u8; 49] = [0x5a; 49];
364
    let run: [u8; 49] = [v; 49];
365
    let after: [u8; 8] = [0x77; 8];
366
    if not allU8(&zero[..], 0) {
367
        return 1;
368
    }
369
    if not allU8(&ones[..], 0xff) {
370
        return 2;
371
    }
372
    if not allU8(&mid[..], 0x5a) {
373
        return 3;
374
    }
375
    if not allU8(&run[..], v) {
376
        return 4;
377
    }
378
    if not intact(&before[..]) or not intact(&after[..]) {
379
        return 5;
380
    }
381
    return 0;
382
}
383
384
/// Fill `[u8; 56]` arrays from constants and a run-time value, and check the elements and the
385
/// guards.
386
fn fillU8_56(seed: u32) -> i32 {
387
    let v = mkU8(seed);
388
    let before: [u8; 8] = [0x77; 8];
389
    let zero: [u8; 56] = [0; 56];
390
    let ones: [u8; 56] = [0xff; 56];
391
    let mid: [u8; 56] = [0x5a; 56];
392
    let run: [u8; 56] = [v; 56];
393
    let after: [u8; 8] = [0x77; 8];
394
    if not allU8(&zero[..], 0) {
395
        return 1;
396
    }
397
    if not allU8(&ones[..], 0xff) {
398
        return 2;
399
    }
400
    if not allU8(&mid[..], 0x5a) {
401
        return 3;
402
    }
403
    if not allU8(&run[..], v) {
404
        return 4;
405
    }
406
    if not intact(&before[..]) or not intact(&after[..]) {
407
        return 5;
408
    }
409
    return 0;
410
}
411
412
/// Fill `[u8; 57]` arrays from constants and a run-time value, and check the elements and the
413
/// guards.
414
fn fillU8_57(seed: u32) -> i32 {
415
    let v = mkU8(seed);
416
    let before: [u8; 8] = [0x77; 8];
417
    let zero: [u8; 57] = [0; 57];
418
    let ones: [u8; 57] = [0xff; 57];
419
    let mid: [u8; 57] = [0x5a; 57];
420
    let run: [u8; 57] = [v; 57];
421
    let after: [u8; 8] = [0x77; 8];
422
    if not allU8(&zero[..], 0) {
423
        return 1;
424
    }
425
    if not allU8(&ones[..], 0xff) {
426
        return 2;
427
    }
428
    if not allU8(&mid[..], 0x5a) {
429
        return 3;
430
    }
431
    if not allU8(&run[..], v) {
432
        return 4;
433
    }
434
    if not intact(&before[..]) or not intact(&after[..]) {
435
        return 5;
436
    }
437
    return 0;
438
}
439
440
/// Fill `[u8; 63]` arrays from constants and a run-time value, and check the elements and the
441
/// guards.
442
fn fillU8_63(seed: u32) -> i32 {
443
    let v = mkU8(seed);
444
    let before: [u8; 8] = [0x77; 8];
445
    let zero: [u8; 63] = [0; 63];
446
    let ones: [u8; 63] = [0xff; 63];
447
    let mid: [u8; 63] = [0x5a; 63];
448
    let run: [u8; 63] = [v; 63];
449
    let after: [u8; 8] = [0x77; 8];
450
    if not allU8(&zero[..], 0) {
451
        return 1;
452
    }
453
    if not allU8(&ones[..], 0xff) {
454
        return 2;
455
    }
456
    if not allU8(&mid[..], 0x5a) {
457
        return 3;
458
    }
459
    if not allU8(&run[..], v) {
460
        return 4;
461
    }
462
    if not intact(&before[..]) or not intact(&after[..]) {
463
        return 5;
464
    }
465
    return 0;
466
}
467
468
/// Fill `[u8; 64]` arrays from constants and a run-time value, and check the elements and the
469
/// guards.
470
fn fillU8_64(seed: u32) -> i32 {
471
    let v = mkU8(seed);
472
    let before: [u8; 8] = [0x77; 8];
473
    let zero: [u8; 64] = [0; 64];
474
    let ones: [u8; 64] = [0xff; 64];
475
    let mid: [u8; 64] = [0x5a; 64];
476
    let run: [u8; 64] = [v; 64];
477
    let after: [u8; 8] = [0x77; 8];
478
    if not allU8(&zero[..], 0) {
479
        return 1;
480
    }
481
    if not allU8(&ones[..], 0xff) {
482
        return 2;
483
    }
484
    if not allU8(&mid[..], 0x5a) {
485
        return 3;
486
    }
487
    if not allU8(&run[..], v) {
488
        return 4;
489
    }
490
    if not intact(&before[..]) or not intact(&after[..]) {
491
        return 5;
492
    }
493
    return 0;
494
}
495
496
/// Fill `[u8; 65]` arrays from constants and a run-time value, and check the elements and the
497
/// guards.
498
fn fillU8_65(seed: u32) -> i32 {
499
    let v = mkU8(seed);
500
    let before: [u8; 8] = [0x77; 8];
501
    let zero: [u8; 65] = [0; 65];
502
    let ones: [u8; 65] = [0xff; 65];
503
    let mid: [u8; 65] = [0x5a; 65];
504
    let run: [u8; 65] = [v; 65];
505
    let after: [u8; 8] = [0x77; 8];
506
    if not allU8(&zero[..], 0) {
507
        return 1;
508
    }
509
    if not allU8(&ones[..], 0xff) {
510
        return 2;
511
    }
512
    if not allU8(&mid[..], 0x5a) {
513
        return 3;
514
    }
515
    if not allU8(&run[..], v) {
516
        return 4;
517
    }
518
    if not intact(&before[..]) or not intact(&after[..]) {
519
        return 5;
520
    }
521
    return 0;
522
}
523
524
/// Fill `[u8; 1023]` arrays from constants and a run-time value, and check the elements and the
525
/// guards.
526
fn fillU8_1023(seed: u32) -> i32 {
527
    let v = mkU8(seed);
528
    let before: [u8; 8] = [0x77; 8];
529
    let zero: [u8; 1023] = [0; 1023];
530
    let ones: [u8; 1023] = [0xff; 1023];
531
    let mid: [u8; 1023] = [0x5a; 1023];
532
    let run: [u8; 1023] = [v; 1023];
533
    let after: [u8; 8] = [0x77; 8];
534
    if not allU8(&zero[..], 0) {
535
        return 1;
536
    }
537
    if not allU8(&ones[..], 0xff) {
538
        return 2;
539
    }
540
    if not allU8(&mid[..], 0x5a) {
541
        return 3;
542
    }
543
    if not allU8(&run[..], v) {
544
        return 4;
545
    }
546
    if not intact(&before[..]) or not intact(&after[..]) {
547
        return 5;
548
    }
549
    return 0;
550
}
551
552
/// Fill `[u8; 1024]` arrays from constants and a run-time value, and check the elements and the
553
/// guards.
554
fn fillU8_1024(seed: u32) -> i32 {
555
    let v = mkU8(seed);
556
    let before: [u8; 8] = [0x77; 8];
557
    let zero: [u8; 1024] = [0; 1024];
558
    let ones: [u8; 1024] = [0xff; 1024];
559
    let mid: [u8; 1024] = [0x5a; 1024];
560
    let run: [u8; 1024] = [v; 1024];
561
    let after: [u8; 8] = [0x77; 8];
562
    if not allU8(&zero[..], 0) {
563
        return 1;
564
    }
565
    if not allU8(&ones[..], 0xff) {
566
        return 2;
567
    }
568
    if not allU8(&mid[..], 0x5a) {
569
        return 3;
570
    }
571
    if not allU8(&run[..], v) {
572
        return 4;
573
    }
574
    if not intact(&before[..]) or not intact(&after[..]) {
575
        return 5;
576
    }
577
    return 0;
578
}
579
580
/// Fill `[u8; 1025]` arrays from constants and a run-time value, and check the elements and the
581
/// guards.
582
fn fillU8_1025(seed: u32) -> i32 {
583
    let v = mkU8(seed);
584
    let before: [u8; 8] = [0x77; 8];
585
    let zero: [u8; 1025] = [0; 1025];
586
    let ones: [u8; 1025] = [0xff; 1025];
587
    let mid: [u8; 1025] = [0x5a; 1025];
588
    let run: [u8; 1025] = [v; 1025];
589
    let after: [u8; 8] = [0x77; 8];
590
    if not allU8(&zero[..], 0) {
591
        return 1;
592
    }
593
    if not allU8(&ones[..], 0xff) {
594
        return 2;
595
    }
596
    if not allU8(&mid[..], 0x5a) {
597
        return 3;
598
    }
599
    if not allU8(&run[..], v) {
600
        return 4;
601
    }
602
    if not intact(&before[..]) or not intact(&after[..]) {
603
        return 5;
604
    }
605
    return 0;
606
}
607
/// Record with an array that does not start at a multiple of 8 bytes.
608
record FrameU8_37: Copy {
609
    /// Byte before the array.
610
    head: u8,
611
    /// Repeated items.
612
    items: [u8; 37],
613
    /// Byte after the array.
614
    tail: u8,
615
}
616
617
/// Check `[u8; 37]` literals in a record literal and in assignments to the field.
618
fn frameU8_37(seed: u32) -> i32 {
619
    let v = mkU8(seed);
620
    let mut f = FrameU8_37 { head: 0x11, items: [v; 37], tail: 0x22 };
621
    if f.head <> 0x11 or f.tail <> 0x22 or not allU8(&f.items[..], v) {
622
        return 1;
623
    }
624
    set f.items = [0; 37];
625
    if f.head <> 0x11 or f.tail <> 0x22 or not allU8(&f.items[..], 0) {
626
        return 2;
627
    }
628
    set f.items = [0xff; 37];
629
    if f.head <> 0x11 or f.tail <> 0x22 or not allU8(&f.items[..], 0xff) {
630
        return 3;
631
    }
632
    let g = FrameU8_37 { head: 0x33, items: [0x5a; 37], tail: 0x44 };
633
    if g.head <> 0x33 or g.tail <> 0x44 or not allU8(&g.items[..], 0x5a) {
634
        return 4;
635
    }
636
    return 0;
637
}
638
/// Record with an array that does not start at a multiple of 8 bytes.
639
record FrameU8_41: Copy {
640
    /// Byte before the array.
641
    head: u8,
642
    /// Repeated items.
643
    items: [u8; 41],
644
    /// Byte after the array.
645
    tail: u8,
646
}
647
648
/// Check `[u8; 41]` literals in a record literal and in assignments to the field.
649
fn frameU8_41(seed: u32) -> i32 {
650
    let v = mkU8(seed);
651
    let mut f = FrameU8_41 { head: 0x11, items: [v; 41], tail: 0x22 };
652
    if f.head <> 0x11 or f.tail <> 0x22 or not allU8(&f.items[..], v) {
653
        return 1;
654
    }
655
    set f.items = [0; 41];
656
    if f.head <> 0x11 or f.tail <> 0x22 or not allU8(&f.items[..], 0) {
657
        return 2;
658
    }
659
    set f.items = [0xff; 41];
660
    if f.head <> 0x11 or f.tail <> 0x22 or not allU8(&f.items[..], 0xff) {
661
        return 3;
662
    }
663
    let g = FrameU8_41 { head: 0x33, items: [0x5a; 41], tail: 0x44 };
664
    if g.head <> 0x33 or g.tail <> 0x44 or not allU8(&g.items[..], 0x5a) {
665
        return 4;
666
    }
667
    return 0;
668
}
669
670
// U16 //
671
672
/// Build a run-time `u16` value with the high bit set.
673
fn mkU16(seed: u32) -> u16 {
674
    return (0x8001 + seed * 0x111) as u16;
675
}
676
677
/// Check that every element of `items` equals `v`.
678
fn allU16(items: &[u16], v: u16) -> bool {
679
    for x in items {
680
        if x <> v {
681
            return false;
682
        }
683
    }
684
    return true;
685
}
686
687
/// Fill `[u16; 33]` arrays from constants and a run-time value, and check the elements and the
688
/// guards.
689
fn fillU16_33(seed: u32) -> i32 {
690
    let v = mkU16(seed);
691
    let before: [u8; 8] = [0x77; 8];
692
    let zero: [u16; 33] = [0; 33];
693
    let ones: [u16; 33] = [0xffff; 33];
694
    let mid: [u16; 33] = [0x1234; 33];
695
    let run: [u16; 33] = [v; 33];
696
    let after: [u8; 8] = [0x77; 8];
697
    if not allU16(&zero[..], 0) {
698
        return 1;
699
    }
700
    if not allU16(&ones[..], 0xffff) {
701
        return 2;
702
    }
703
    if not allU16(&mid[..], 0x1234) {
704
        return 3;
705
    }
706
    if not allU16(&run[..], v) {
707
        return 4;
708
    }
709
    if not intact(&before[..]) or not intact(&after[..]) {
710
        return 5;
711
    }
712
    return 0;
713
}
714
715
/// Fill `[u16; 34]` arrays from constants and a run-time value, and check the elements and the
716
/// guards.
717
fn fillU16_34(seed: u32) -> i32 {
718
    let v = mkU16(seed);
719
    let before: [u8; 8] = [0x77; 8];
720
    let zero: [u16; 34] = [0; 34];
721
    let ones: [u16; 34] = [0xffff; 34];
722
    let mid: [u16; 34] = [0x1234; 34];
723
    let run: [u16; 34] = [v; 34];
724
    let after: [u8; 8] = [0x77; 8];
725
    if not allU16(&zero[..], 0) {
726
        return 1;
727
    }
728
    if not allU16(&ones[..], 0xffff) {
729
        return 2;
730
    }
731
    if not allU16(&mid[..], 0x1234) {
732
        return 3;
733
    }
734
    if not allU16(&run[..], v) {
735
        return 4;
736
    }
737
    if not intact(&before[..]) or not intact(&after[..]) {
738
        return 5;
739
    }
740
    return 0;
741
}
742
743
/// Fill `[u16; 35]` arrays from constants and a run-time value, and check the elements and the
744
/// guards.
745
fn fillU16_35(seed: u32) -> i32 {
746
    let v = mkU16(seed);
747
    let before: [u8; 8] = [0x77; 8];
748
    let zero: [u16; 35] = [0; 35];
749
    let ones: [u16; 35] = [0xffff; 35];
750
    let mid: [u16; 35] = [0x1234; 35];
751
    let run: [u16; 35] = [v; 35];
752
    let after: [u8; 8] = [0x77; 8];
753
    if not allU16(&zero[..], 0) {
754
        return 1;
755
    }
756
    if not allU16(&ones[..], 0xffff) {
757
        return 2;
758
    }
759
    if not allU16(&mid[..], 0x1234) {
760
        return 3;
761
    }
762
    if not allU16(&run[..], v) {
763
        return 4;
764
    }
765
    if not intact(&before[..]) or not intact(&after[..]) {
766
        return 5;
767
    }
768
    return 0;
769
}
770
771
/// Fill `[u16; 36]` arrays from constants and a run-time value, and check the elements and the
772
/// guards.
773
fn fillU16_36(seed: u32) -> i32 {
774
    let v = mkU16(seed);
775
    let before: [u8; 8] = [0x77; 8];
776
    let zero: [u16; 36] = [0; 36];
777
    let ones: [u16; 36] = [0xffff; 36];
778
    let mid: [u16; 36] = [0x1234; 36];
779
    let run: [u16; 36] = [v; 36];
780
    let after: [u8; 8] = [0x77; 8];
781
    if not allU16(&zero[..], 0) {
782
        return 1;
783
    }
784
    if not allU16(&ones[..], 0xffff) {
785
        return 2;
786
    }
787
    if not allU16(&mid[..], 0x1234) {
788
        return 3;
789
    }
790
    if not allU16(&run[..], v) {
791
        return 4;
792
    }
793
    if not intact(&before[..]) or not intact(&after[..]) {
794
        return 5;
795
    }
796
    return 0;
797
}
798
799
/// Fill `[u16; 37]` arrays from constants and a run-time value, and check the elements and the
800
/// guards.
801
fn fillU16_37(seed: u32) -> i32 {
802
    let v = mkU16(seed);
803
    let before: [u8; 8] = [0x77; 8];
804
    let zero: [u16; 37] = [0; 37];
805
    let ones: [u16; 37] = [0xffff; 37];
806
    let mid: [u16; 37] = [0x1234; 37];
807
    let run: [u16; 37] = [v; 37];
808
    let after: [u8; 8] = [0x77; 8];
809
    if not allU16(&zero[..], 0) {
810
        return 1;
811
    }
812
    if not allU16(&ones[..], 0xffff) {
813
        return 2;
814
    }
815
    if not allU16(&mid[..], 0x1234) {
816
        return 3;
817
    }
818
    if not allU16(&run[..], v) {
819
        return 4;
820
    }
821
    if not intact(&before[..]) or not intact(&after[..]) {
822
        return 5;
823
    }
824
    return 0;
825
}
826
827
/// Fill `[u16; 40]` arrays from constants and a run-time value, and check the elements and the
828
/// guards.
829
fn fillU16_40(seed: u32) -> i32 {
830
    let v = mkU16(seed);
831
    let before: [u8; 8] = [0x77; 8];
832
    let zero: [u16; 40] = [0; 40];
833
    let ones: [u16; 40] = [0xffff; 40];
834
    let mid: [u16; 40] = [0x1234; 40];
835
    let run: [u16; 40] = [v; 40];
836
    let after: [u8; 8] = [0x77; 8];
837
    if not allU16(&zero[..], 0) {
838
        return 1;
839
    }
840
    if not allU16(&ones[..], 0xffff) {
841
        return 2;
842
    }
843
    if not allU16(&mid[..], 0x1234) {
844
        return 3;
845
    }
846
    if not allU16(&run[..], v) {
847
        return 4;
848
    }
849
    if not intact(&before[..]) or not intact(&after[..]) {
850
        return 5;
851
    }
852
    return 0;
853
}
854
855
/// Fill `[u16; 63]` arrays from constants and a run-time value, and check the elements and the
856
/// guards.
857
fn fillU16_63(seed: u32) -> i32 {
858
    let v = mkU16(seed);
859
    let before: [u8; 8] = [0x77; 8];
860
    let zero: [u16; 63] = [0; 63];
861
    let ones: [u16; 63] = [0xffff; 63];
862
    let mid: [u16; 63] = [0x1234; 63];
863
    let run: [u16; 63] = [v; 63];
864
    let after: [u8; 8] = [0x77; 8];
865
    if not allU16(&zero[..], 0) {
866
        return 1;
867
    }
868
    if not allU16(&ones[..], 0xffff) {
869
        return 2;
870
    }
871
    if not allU16(&mid[..], 0x1234) {
872
        return 3;
873
    }
874
    if not allU16(&run[..], v) {
875
        return 4;
876
    }
877
    if not intact(&before[..]) or not intact(&after[..]) {
878
        return 5;
879
    }
880
    return 0;
881
}
882
883
/// Fill `[u16; 64]` arrays from constants and a run-time value, and check the elements and the
884
/// guards.
885
fn fillU16_64(seed: u32) -> i32 {
886
    let v = mkU16(seed);
887
    let before: [u8; 8] = [0x77; 8];
888
    let zero: [u16; 64] = [0; 64];
889
    let ones: [u16; 64] = [0xffff; 64];
890
    let mid: [u16; 64] = [0x1234; 64];
891
    let run: [u16; 64] = [v; 64];
892
    let after: [u8; 8] = [0x77; 8];
893
    if not allU16(&zero[..], 0) {
894
        return 1;
895
    }
896
    if not allU16(&ones[..], 0xffff) {
897
        return 2;
898
    }
899
    if not allU16(&mid[..], 0x1234) {
900
        return 3;
901
    }
902
    if not allU16(&run[..], v) {
903
        return 4;
904
    }
905
    if not intact(&before[..]) or not intact(&after[..]) {
906
        return 5;
907
    }
908
    return 0;
909
}
910
911
/// Fill `[u16; 65]` arrays from constants and a run-time value, and check the elements and the
912
/// guards.
913
fn fillU16_65(seed: u32) -> i32 {
914
    let v = mkU16(seed);
915
    let before: [u8; 8] = [0x77; 8];
916
    let zero: [u16; 65] = [0; 65];
917
    let ones: [u16; 65] = [0xffff; 65];
918
    let mid: [u16; 65] = [0x1234; 65];
919
    let run: [u16; 65] = [v; 65];
920
    let after: [u8; 8] = [0x77; 8];
921
    if not allU16(&zero[..], 0) {
922
        return 1;
923
    }
924
    if not allU16(&ones[..], 0xffff) {
925
        return 2;
926
    }
927
    if not allU16(&mid[..], 0x1234) {
928
        return 3;
929
    }
930
    if not allU16(&run[..], v) {
931
        return 4;
932
    }
933
    if not intact(&before[..]) or not intact(&after[..]) {
934
        return 5;
935
    }
936
    return 0;
937
}
938
939
/// Fill `[u16; 1023]` arrays from constants and a run-time value, and check the elements and the
940
/// guards.
941
fn fillU16_1023(seed: u32) -> i32 {
942
    let v = mkU16(seed);
943
    let before: [u8; 8] = [0x77; 8];
944
    let zero: [u16; 1023] = [0; 1023];
945
    let ones: [u16; 1023] = [0xffff; 1023];
946
    let mid: [u16; 1023] = [0x1234; 1023];
947
    let run: [u16; 1023] = [v; 1023];
948
    let after: [u8; 8] = [0x77; 8];
949
    if not allU16(&zero[..], 0) {
950
        return 1;
951
    }
952
    if not allU16(&ones[..], 0xffff) {
953
        return 2;
954
    }
955
    if not allU16(&mid[..], 0x1234) {
956
        return 3;
957
    }
958
    if not allU16(&run[..], v) {
959
        return 4;
960
    }
961
    if not intact(&before[..]) or not intact(&after[..]) {
962
        return 5;
963
    }
964
    return 0;
965
}
966
967
/// Fill `[u16; 1024]` arrays from constants and a run-time value, and check the elements and the
968
/// guards.
969
fn fillU16_1024(seed: u32) -> i32 {
970
    let v = mkU16(seed);
971
    let before: [u8; 8] = [0x77; 8];
972
    let zero: [u16; 1024] = [0; 1024];
973
    let ones: [u16; 1024] = [0xffff; 1024];
974
    let mid: [u16; 1024] = [0x1234; 1024];
975
    let run: [u16; 1024] = [v; 1024];
976
    let after: [u8; 8] = [0x77; 8];
977
    if not allU16(&zero[..], 0) {
978
        return 1;
979
    }
980
    if not allU16(&ones[..], 0xffff) {
981
        return 2;
982
    }
983
    if not allU16(&mid[..], 0x1234) {
984
        return 3;
985
    }
986
    if not allU16(&run[..], v) {
987
        return 4;
988
    }
989
    if not intact(&before[..]) or not intact(&after[..]) {
990
        return 5;
991
    }
992
    return 0;
993
}
994
995
/// Fill `[u16; 1025]` arrays from constants and a run-time value, and check the elements and the
996
/// guards.
997
fn fillU16_1025(seed: u32) -> i32 {
998
    let v = mkU16(seed);
999
    let before: [u8; 8] = [0x77; 8];
1000
    let zero: [u16; 1025] = [0; 1025];
1001
    let ones: [u16; 1025] = [0xffff; 1025];
1002
    let mid: [u16; 1025] = [0x1234; 1025];
1003
    let run: [u16; 1025] = [v; 1025];
1004
    let after: [u8; 8] = [0x77; 8];
1005
    if not allU16(&zero[..], 0) {
1006
        return 1;
1007
    }
1008
    if not allU16(&ones[..], 0xffff) {
1009
        return 2;
1010
    }
1011
    if not allU16(&mid[..], 0x1234) {
1012
        return 3;
1013
    }
1014
    if not allU16(&run[..], v) {
1015
        return 4;
1016
    }
1017
    if not intact(&before[..]) or not intact(&after[..]) {
1018
        return 5;
1019
    }
1020
    return 0;
1021
}
1022
/// Record with an array that does not start at a multiple of 8 bytes.
1023
record FrameU16_37: Copy {
1024
    /// Byte before the array.
1025
    head: u8,
1026
    /// Repeated items.
1027
    items: [u16; 37],
1028
    /// Byte after the array.
1029
    tail: u8,
1030
}
1031
1032
/// Check `[u16; 37]` literals in a record literal and in assignments to the field.
1033
fn frameU16_37(seed: u32) -> i32 {
1034
    let v = mkU16(seed);
1035
    let mut f = FrameU16_37 { head: 0x11, items: [v; 37], tail: 0x22 };
1036
    if f.head <> 0x11 or f.tail <> 0x22 or not allU16(&f.items[..], v) {
1037
        return 1;
1038
    }
1039
    set f.items = [0; 37];
1040
    if f.head <> 0x11 or f.tail <> 0x22 or not allU16(&f.items[..], 0) {
1041
        return 2;
1042
    }
1043
    set f.items = [0xffff; 37];
1044
    if f.head <> 0x11 or f.tail <> 0x22 or not allU16(&f.items[..], 0xffff) {
1045
        return 3;
1046
    }
1047
    let g = FrameU16_37 { head: 0x33, items: [0x1234; 37], tail: 0x44 };
1048
    if g.head <> 0x33 or g.tail <> 0x44 or not allU16(&g.items[..], 0x1234) {
1049
        return 4;
1050
    }
1051
    return 0;
1052
}
1053
1054
// U32 //
1055
1056
/// Build a run-time `u32` value with the high bit set.
1057
fn mkU32(seed: u32) -> u32 {
1058
    return 0x89ABCDEF + seed;
1059
}
1060
1061
/// Check that every element of `items` equals `v`.
1062
fn allU32(items: &[u32], v: u32) -> bool {
1063
    for x in items {
1064
        if x <> v {
1065
            return false;
1066
        }
1067
    }
1068
    return true;
1069
}
1070
1071
/// Fill `[u32; 33]` arrays from constants and a run-time value, and check the elements and the
1072
/// guards.
1073
fn fillU32_33(seed: u32) -> i32 {
1074
    let v = mkU32(seed);
1075
    let before: [u8; 8] = [0x77; 8];
1076
    let zero: [u32; 33] = [0; 33];
1077
    let ones: [u32; 33] = [0xffffffff; 33];
1078
    let mid: [u32; 33] = [0x1234; 33];
1079
    let run: [u32; 33] = [v; 33];
1080
    let after: [u8; 8] = [0x77; 8];
1081
    if not allU32(&zero[..], 0) {
1082
        return 1;
1083
    }
1084
    if not allU32(&ones[..], 0xffffffff) {
1085
        return 2;
1086
    }
1087
    if not allU32(&mid[..], 0x1234) {
1088
        return 3;
1089
    }
1090
    if not allU32(&run[..], v) {
1091
        return 4;
1092
    }
1093
    if not intact(&before[..]) or not intact(&after[..]) {
1094
        return 5;
1095
    }
1096
    return 0;
1097
}
1098
1099
/// Fill `[u32; 34]` arrays from constants and a run-time value, and check the elements and the
1100
/// guards.
1101
fn fillU32_34(seed: u32) -> i32 {
1102
    let v = mkU32(seed);
1103
    let before: [u8; 8] = [0x77; 8];
1104
    let zero: [u32; 34] = [0; 34];
1105
    let ones: [u32; 34] = [0xffffffff; 34];
1106
    let mid: [u32; 34] = [0x1234; 34];
1107
    let run: [u32; 34] = [v; 34];
1108
    let after: [u8; 8] = [0x77; 8];
1109
    if not allU32(&zero[..], 0) {
1110
        return 1;
1111
    }
1112
    if not allU32(&ones[..], 0xffffffff) {
1113
        return 2;
1114
    }
1115
    if not allU32(&mid[..], 0x1234) {
1116
        return 3;
1117
    }
1118
    if not allU32(&run[..], v) {
1119
        return 4;
1120
    }
1121
    if not intact(&before[..]) or not intact(&after[..]) {
1122
        return 5;
1123
    }
1124
    return 0;
1125
}
1126
1127
/// Fill `[u32; 35]` arrays from constants and a run-time value, and check the elements and the
1128
/// guards.
1129
fn fillU32_35(seed: u32) -> i32 {
1130
    let v = mkU32(seed);
1131
    let before: [u8; 8] = [0x77; 8];
1132
    let zero: [u32; 35] = [0; 35];
1133
    let ones: [u32; 35] = [0xffffffff; 35];
1134
    let mid: [u32; 35] = [0x1234; 35];
1135
    let run: [u32; 35] = [v; 35];
1136
    let after: [u8; 8] = [0x77; 8];
1137
    if not allU32(&zero[..], 0) {
1138
        return 1;
1139
    }
1140
    if not allU32(&ones[..], 0xffffffff) {
1141
        return 2;
1142
    }
1143
    if not allU32(&mid[..], 0x1234) {
1144
        return 3;
1145
    }
1146
    if not allU32(&run[..], v) {
1147
        return 4;
1148
    }
1149
    if not intact(&before[..]) or not intact(&after[..]) {
1150
        return 5;
1151
    }
1152
    return 0;
1153
}
1154
1155
/// Fill `[u32; 36]` arrays from constants and a run-time value, and check the elements and the
1156
/// guards.
1157
fn fillU32_36(seed: u32) -> i32 {
1158
    let v = mkU32(seed);
1159
    let before: [u8; 8] = [0x77; 8];
1160
    let zero: [u32; 36] = [0; 36];
1161
    let ones: [u32; 36] = [0xffffffff; 36];
1162
    let mid: [u32; 36] = [0x1234; 36];
1163
    let run: [u32; 36] = [v; 36];
1164
    let after: [u8; 8] = [0x77; 8];
1165
    if not allU32(&zero[..], 0) {
1166
        return 1;
1167
    }
1168
    if not allU32(&ones[..], 0xffffffff) {
1169
        return 2;
1170
    }
1171
    if not allU32(&mid[..], 0x1234) {
1172
        return 3;
1173
    }
1174
    if not allU32(&run[..], v) {
1175
        return 4;
1176
    }
1177
    if not intact(&before[..]) or not intact(&after[..]) {
1178
        return 5;
1179
    }
1180
    return 0;
1181
}
1182
1183
/// Fill `[u32; 37]` arrays from constants and a run-time value, and check the elements and the
1184
/// guards.
1185
fn fillU32_37(seed: u32) -> i32 {
1186
    let v = mkU32(seed);
1187
    let before: [u8; 8] = [0x77; 8];
1188
    let zero: [u32; 37] = [0; 37];
1189
    let ones: [u32; 37] = [0xffffffff; 37];
1190
    let mid: [u32; 37] = [0x1234; 37];
1191
    let run: [u32; 37] = [v; 37];
1192
    let after: [u8; 8] = [0x77; 8];
1193
    if not allU32(&zero[..], 0) {
1194
        return 1;
1195
    }
1196
    if not allU32(&ones[..], 0xffffffff) {
1197
        return 2;
1198
    }
1199
    if not allU32(&mid[..], 0x1234) {
1200
        return 3;
1201
    }
1202
    if not allU32(&run[..], v) {
1203
        return 4;
1204
    }
1205
    if not intact(&before[..]) or not intact(&after[..]) {
1206
        return 5;
1207
    }
1208
    return 0;
1209
}
1210
1211
/// Fill `[u32; 40]` arrays from constants and a run-time value, and check the elements and the
1212
/// guards.
1213
fn fillU32_40(seed: u32) -> i32 {
1214
    let v = mkU32(seed);
1215
    let before: [u8; 8] = [0x77; 8];
1216
    let zero: [u32; 40] = [0; 40];
1217
    let ones: [u32; 40] = [0xffffffff; 40];
1218
    let mid: [u32; 40] = [0x1234; 40];
1219
    let run: [u32; 40] = [v; 40];
1220
    let after: [u8; 8] = [0x77; 8];
1221
    if not allU32(&zero[..], 0) {
1222
        return 1;
1223
    }
1224
    if not allU32(&ones[..], 0xffffffff) {
1225
        return 2;
1226
    }
1227
    if not allU32(&mid[..], 0x1234) {
1228
        return 3;
1229
    }
1230
    if not allU32(&run[..], v) {
1231
        return 4;
1232
    }
1233
    if not intact(&before[..]) or not intact(&after[..]) {
1234
        return 5;
1235
    }
1236
    return 0;
1237
}
1238
1239
/// Fill `[u32; 63]` arrays from constants and a run-time value, and check the elements and the
1240
/// guards.
1241
fn fillU32_63(seed: u32) -> i32 {
1242
    let v = mkU32(seed);
1243
    let before: [u8; 8] = [0x77; 8];
1244
    let zero: [u32; 63] = [0; 63];
1245
    let ones: [u32; 63] = [0xffffffff; 63];
1246
    let mid: [u32; 63] = [0x1234; 63];
1247
    let run: [u32; 63] = [v; 63];
1248
    let after: [u8; 8] = [0x77; 8];
1249
    if not allU32(&zero[..], 0) {
1250
        return 1;
1251
    }
1252
    if not allU32(&ones[..], 0xffffffff) {
1253
        return 2;
1254
    }
1255
    if not allU32(&mid[..], 0x1234) {
1256
        return 3;
1257
    }
1258
    if not allU32(&run[..], v) {
1259
        return 4;
1260
    }
1261
    if not intact(&before[..]) or not intact(&after[..]) {
1262
        return 5;
1263
    }
1264
    return 0;
1265
}
1266
1267
/// Fill `[u32; 64]` arrays from constants and a run-time value, and check the elements and the
1268
/// guards.
1269
fn fillU32_64(seed: u32) -> i32 {
1270
    let v = mkU32(seed);
1271
    let before: [u8; 8] = [0x77; 8];
1272
    let zero: [u32; 64] = [0; 64];
1273
    let ones: [u32; 64] = [0xffffffff; 64];
1274
    let mid: [u32; 64] = [0x1234; 64];
1275
    let run: [u32; 64] = [v; 64];
1276
    let after: [u8; 8] = [0x77; 8];
1277
    if not allU32(&zero[..], 0) {
1278
        return 1;
1279
    }
1280
    if not allU32(&ones[..], 0xffffffff) {
1281
        return 2;
1282
    }
1283
    if not allU32(&mid[..], 0x1234) {
1284
        return 3;
1285
    }
1286
    if not allU32(&run[..], v) {
1287
        return 4;
1288
    }
1289
    if not intact(&before[..]) or not intact(&after[..]) {
1290
        return 5;
1291
    }
1292
    return 0;
1293
}
1294
1295
/// Fill `[u32; 65]` arrays from constants and a run-time value, and check the elements and the
1296
/// guards.
1297
fn fillU32_65(seed: u32) -> i32 {
1298
    let v = mkU32(seed);
1299
    let before: [u8; 8] = [0x77; 8];
1300
    let zero: [u32; 65] = [0; 65];
1301
    let ones: [u32; 65] = [0xffffffff; 65];
1302
    let mid: [u32; 65] = [0x1234; 65];
1303
    let run: [u32; 65] = [v; 65];
1304
    let after: [u8; 8] = [0x77; 8];
1305
    if not allU32(&zero[..], 0) {
1306
        return 1;
1307
    }
1308
    if not allU32(&ones[..], 0xffffffff) {
1309
        return 2;
1310
    }
1311
    if not allU32(&mid[..], 0x1234) {
1312
        return 3;
1313
    }
1314
    if not allU32(&run[..], v) {
1315
        return 4;
1316
    }
1317
    if not intact(&before[..]) or not intact(&after[..]) {
1318
        return 5;
1319
    }
1320
    return 0;
1321
}
1322
1323
/// Fill `[u32; 1023]` arrays from constants and a run-time value, and check the elements and the
1324
/// guards.
1325
fn fillU32_1023(seed: u32) -> i32 {
1326
    let v = mkU32(seed);
1327
    let before: [u8; 8] = [0x77; 8];
1328
    let zero: [u32; 1023] = [0; 1023];
1329
    let ones: [u32; 1023] = [0xffffffff; 1023];
1330
    let mid: [u32; 1023] = [0x1234; 1023];
1331
    let run: [u32; 1023] = [v; 1023];
1332
    let after: [u8; 8] = [0x77; 8];
1333
    if not allU32(&zero[..], 0) {
1334
        return 1;
1335
    }
1336
    if not allU32(&ones[..], 0xffffffff) {
1337
        return 2;
1338
    }
1339
    if not allU32(&mid[..], 0x1234) {
1340
        return 3;
1341
    }
1342
    if not allU32(&run[..], v) {
1343
        return 4;
1344
    }
1345
    if not intact(&before[..]) or not intact(&after[..]) {
1346
        return 5;
1347
    }
1348
    return 0;
1349
}
1350
1351
/// Fill `[u32; 1024]` arrays from constants and a run-time value, and check the elements and the
1352
/// guards.
1353
fn fillU32_1024(seed: u32) -> i32 {
1354
    let v = mkU32(seed);
1355
    let before: [u8; 8] = [0x77; 8];
1356
    let zero: [u32; 1024] = [0; 1024];
1357
    let ones: [u32; 1024] = [0xffffffff; 1024];
1358
    let mid: [u32; 1024] = [0x1234; 1024];
1359
    let run: [u32; 1024] = [v; 1024];
1360
    let after: [u8; 8] = [0x77; 8];
1361
    if not allU32(&zero[..], 0) {
1362
        return 1;
1363
    }
1364
    if not allU32(&ones[..], 0xffffffff) {
1365
        return 2;
1366
    }
1367
    if not allU32(&mid[..], 0x1234) {
1368
        return 3;
1369
    }
1370
    if not allU32(&run[..], v) {
1371
        return 4;
1372
    }
1373
    if not intact(&before[..]) or not intact(&after[..]) {
1374
        return 5;
1375
    }
1376
    return 0;
1377
}
1378
1379
/// Fill `[u32; 1025]` arrays from constants and a run-time value, and check the elements and the
1380
/// guards.
1381
fn fillU32_1025(seed: u32) -> i32 {
1382
    let v = mkU32(seed);
1383
    let before: [u8; 8] = [0x77; 8];
1384
    let zero: [u32; 1025] = [0; 1025];
1385
    let ones: [u32; 1025] = [0xffffffff; 1025];
1386
    let mid: [u32; 1025] = [0x1234; 1025];
1387
    let run: [u32; 1025] = [v; 1025];
1388
    let after: [u8; 8] = [0x77; 8];
1389
    if not allU32(&zero[..], 0) {
1390
        return 1;
1391
    }
1392
    if not allU32(&ones[..], 0xffffffff) {
1393
        return 2;
1394
    }
1395
    if not allU32(&mid[..], 0x1234) {
1396
        return 3;
1397
    }
1398
    if not allU32(&run[..], v) {
1399
        return 4;
1400
    }
1401
    if not intact(&before[..]) or not intact(&after[..]) {
1402
        return 5;
1403
    }
1404
    return 0;
1405
}
1406
/// Record with an array that does not start at a multiple of 8 bytes.
1407
record FrameU32_37: Copy {
1408
    /// Byte before the array.
1409
    head: u8,
1410
    /// Repeated items.
1411
    items: [u32; 37],
1412
    /// Byte after the array.
1413
    tail: u8,
1414
}
1415
1416
/// Check `[u32; 37]` literals in a record literal and in assignments to the field.
1417
fn frameU32_37(seed: u32) -> i32 {
1418
    let v = mkU32(seed);
1419
    let mut f = FrameU32_37 { head: 0x11, items: [v; 37], tail: 0x22 };
1420
    if f.head <> 0x11 or f.tail <> 0x22 or not allU32(&f.items[..], v) {
1421
        return 1;
1422
    }
1423
    set f.items = [0; 37];
1424
    if f.head <> 0x11 or f.tail <> 0x22 or not allU32(&f.items[..], 0) {
1425
        return 2;
1426
    }
1427
    set f.items = [0xffffffff; 37];
1428
    if f.head <> 0x11 or f.tail <> 0x22 or not allU32(&f.items[..], 0xffffffff) {
1429
        return 3;
1430
    }
1431
    let g = FrameU32_37 { head: 0x33, items: [0x1234; 37], tail: 0x44 };
1432
    if g.head <> 0x33 or g.tail <> 0x44 or not allU32(&g.items[..], 0x1234) {
1433
        return 4;
1434
    }
1435
    return 0;
1436
}
1437
1438
// U64 //
1439
1440
/// Build a run-time `u64` value with the high bit set.
1441
fn mkU64(seed: u32) -> u64 {
1442
    return 0x8123456789ABCDEF + seed as u64;
1443
}
1444
1445
/// Check that every element of `items` equals `v`.
1446
fn allU64(items: &[u64], v: u64) -> bool {
1447
    for x in items {
1448
        if x <> v {
1449
            return false;
1450
        }
1451
    }
1452
    return true;
1453
}
1454
1455
/// Fill `[u64; 33]` arrays from constants and a run-time value, and check the elements and the
1456
/// guards.
1457
fn fillU64_33(seed: u32) -> i32 {
1458
    let v = mkU64(seed);
1459
    let before: [u8; 8] = [0x77; 8];
1460
    let zero: [u64; 33] = [0; 33];
1461
    let ones: [u64; 33] = [0xffffffffffffffff; 33];
1462
    let mid: [u64; 33] = [0x1234; 33];
1463
    let run: [u64; 33] = [v; 33];
1464
    let after: [u8; 8] = [0x77; 8];
1465
    if not allU64(&zero[..], 0) {
1466
        return 1;
1467
    }
1468
    if not allU64(&ones[..], 0xffffffffffffffff) {
1469
        return 2;
1470
    }
1471
    if not allU64(&mid[..], 0x1234) {
1472
        return 3;
1473
    }
1474
    if not allU64(&run[..], v) {
1475
        return 4;
1476
    }
1477
    if not intact(&before[..]) or not intact(&after[..]) {
1478
        return 5;
1479
    }
1480
    return 0;
1481
}
1482
1483
/// Fill `[u64; 34]` arrays from constants and a run-time value, and check the elements and the
1484
/// guards.
1485
fn fillU64_34(seed: u32) -> i32 {
1486
    let v = mkU64(seed);
1487
    let before: [u8; 8] = [0x77; 8];
1488
    let zero: [u64; 34] = [0; 34];
1489
    let ones: [u64; 34] = [0xffffffffffffffff; 34];
1490
    let mid: [u64; 34] = [0x1234; 34];
1491
    let run: [u64; 34] = [v; 34];
1492
    let after: [u8; 8] = [0x77; 8];
1493
    if not allU64(&zero[..], 0) {
1494
        return 1;
1495
    }
1496
    if not allU64(&ones[..], 0xffffffffffffffff) {
1497
        return 2;
1498
    }
1499
    if not allU64(&mid[..], 0x1234) {
1500
        return 3;
1501
    }
1502
    if not allU64(&run[..], v) {
1503
        return 4;
1504
    }
1505
    if not intact(&before[..]) or not intact(&after[..]) {
1506
        return 5;
1507
    }
1508
    return 0;
1509
}
1510
1511
/// Fill `[u64; 35]` arrays from constants and a run-time value, and check the elements and the
1512
/// guards.
1513
fn fillU64_35(seed: u32) -> i32 {
1514
    let v = mkU64(seed);
1515
    let before: [u8; 8] = [0x77; 8];
1516
    let zero: [u64; 35] = [0; 35];
1517
    let ones: [u64; 35] = [0xffffffffffffffff; 35];
1518
    let mid: [u64; 35] = [0x1234; 35];
1519
    let run: [u64; 35] = [v; 35];
1520
    let after: [u8; 8] = [0x77; 8];
1521
    if not allU64(&zero[..], 0) {
1522
        return 1;
1523
    }
1524
    if not allU64(&ones[..], 0xffffffffffffffff) {
1525
        return 2;
1526
    }
1527
    if not allU64(&mid[..], 0x1234) {
1528
        return 3;
1529
    }
1530
    if not allU64(&run[..], v) {
1531
        return 4;
1532
    }
1533
    if not intact(&before[..]) or not intact(&after[..]) {
1534
        return 5;
1535
    }
1536
    return 0;
1537
}
1538
1539
/// Fill `[u64; 36]` arrays from constants and a run-time value, and check the elements and the
1540
/// guards.
1541
fn fillU64_36(seed: u32) -> i32 {
1542
    let v = mkU64(seed);
1543
    let before: [u8; 8] = [0x77; 8];
1544
    let zero: [u64; 36] = [0; 36];
1545
    let ones: [u64; 36] = [0xffffffffffffffff; 36];
1546
    let mid: [u64; 36] = [0x1234; 36];
1547
    let run: [u64; 36] = [v; 36];
1548
    let after: [u8; 8] = [0x77; 8];
1549
    if not allU64(&zero[..], 0) {
1550
        return 1;
1551
    }
1552
    if not allU64(&ones[..], 0xffffffffffffffff) {
1553
        return 2;
1554
    }
1555
    if not allU64(&mid[..], 0x1234) {
1556
        return 3;
1557
    }
1558
    if not allU64(&run[..], v) {
1559
        return 4;
1560
    }
1561
    if not intact(&before[..]) or not intact(&after[..]) {
1562
        return 5;
1563
    }
1564
    return 0;
1565
}
1566
1567
/// Fill `[u64; 37]` arrays from constants and a run-time value, and check the elements and the
1568
/// guards.
1569
fn fillU64_37(seed: u32) -> i32 {
1570
    let v = mkU64(seed);
1571
    let before: [u8; 8] = [0x77; 8];
1572
    let zero: [u64; 37] = [0; 37];
1573
    let ones: [u64; 37] = [0xffffffffffffffff; 37];
1574
    let mid: [u64; 37] = [0x1234; 37];
1575
    let run: [u64; 37] = [v; 37];
1576
    let after: [u8; 8] = [0x77; 8];
1577
    if not allU64(&zero[..], 0) {
1578
        return 1;
1579
    }
1580
    if not allU64(&ones[..], 0xffffffffffffffff) {
1581
        return 2;
1582
    }
1583
    if not allU64(&mid[..], 0x1234) {
1584
        return 3;
1585
    }
1586
    if not allU64(&run[..], v) {
1587
        return 4;
1588
    }
1589
    if not intact(&before[..]) or not intact(&after[..]) {
1590
        return 5;
1591
    }
1592
    return 0;
1593
}
1594
1595
/// Fill `[u64; 40]` arrays from constants and a run-time value, and check the elements and the
1596
/// guards.
1597
fn fillU64_40(seed: u32) -> i32 {
1598
    let v = mkU64(seed);
1599
    let before: [u8; 8] = [0x77; 8];
1600
    let zero: [u64; 40] = [0; 40];
1601
    let ones: [u64; 40] = [0xffffffffffffffff; 40];
1602
    let mid: [u64; 40] = [0x1234; 40];
1603
    let run: [u64; 40] = [v; 40];
1604
    let after: [u8; 8] = [0x77; 8];
1605
    if not allU64(&zero[..], 0) {
1606
        return 1;
1607
    }
1608
    if not allU64(&ones[..], 0xffffffffffffffff) {
1609
        return 2;
1610
    }
1611
    if not allU64(&mid[..], 0x1234) {
1612
        return 3;
1613
    }
1614
    if not allU64(&run[..], v) {
1615
        return 4;
1616
    }
1617
    if not intact(&before[..]) or not intact(&after[..]) {
1618
        return 5;
1619
    }
1620
    return 0;
1621
}
1622
1623
/// Fill `[u64; 1023]` arrays from constants and a run-time value, and check the elements and the
1624
/// guards.
1625
fn fillU64_1023(seed: u32) -> i32 {
1626
    let v = mkU64(seed);
1627
    let before: [u8; 8] = [0x77; 8];
1628
    let zero: [u64; 1023] = [0; 1023];
1629
    let ones: [u64; 1023] = [0xffffffffffffffff; 1023];
1630
    let mid: [u64; 1023] = [0x1234; 1023];
1631
    let run: [u64; 1023] = [v; 1023];
1632
    let after: [u8; 8] = [0x77; 8];
1633
    if not allU64(&zero[..], 0) {
1634
        return 1;
1635
    }
1636
    if not allU64(&ones[..], 0xffffffffffffffff) {
1637
        return 2;
1638
    }
1639
    if not allU64(&mid[..], 0x1234) {
1640
        return 3;
1641
    }
1642
    if not allU64(&run[..], v) {
1643
        return 4;
1644
    }
1645
    if not intact(&before[..]) or not intact(&after[..]) {
1646
        return 5;
1647
    }
1648
    return 0;
1649
}
1650
1651
/// Fill `[u64; 1024]` arrays from constants and a run-time value, and check the elements and the
1652
/// guards.
1653
fn fillU64_1024(seed: u32) -> i32 {
1654
    let v = mkU64(seed);
1655
    let before: [u8; 8] = [0x77; 8];
1656
    let zero: [u64; 1024] = [0; 1024];
1657
    let ones: [u64; 1024] = [0xffffffffffffffff; 1024];
1658
    let mid: [u64; 1024] = [0x1234; 1024];
1659
    let run: [u64; 1024] = [v; 1024];
1660
    let after: [u8; 8] = [0x77; 8];
1661
    if not allU64(&zero[..], 0) {
1662
        return 1;
1663
    }
1664
    if not allU64(&ones[..], 0xffffffffffffffff) {
1665
        return 2;
1666
    }
1667
    if not allU64(&mid[..], 0x1234) {
1668
        return 3;
1669
    }
1670
    if not allU64(&run[..], v) {
1671
        return 4;
1672
    }
1673
    if not intact(&before[..]) or not intact(&after[..]) {
1674
        return 5;
1675
    }
1676
    return 0;
1677
}
1678
1679
/// Fill `[u64; 1025]` arrays from constants and a run-time value, and check the elements and the
1680
/// guards.
1681
fn fillU64_1025(seed: u32) -> i32 {
1682
    let v = mkU64(seed);
1683
    let before: [u8; 8] = [0x77; 8];
1684
    let zero: [u64; 1025] = [0; 1025];
1685
    let ones: [u64; 1025] = [0xffffffffffffffff; 1025];
1686
    let mid: [u64; 1025] = [0x1234; 1025];
1687
    let run: [u64; 1025] = [v; 1025];
1688
    let after: [u8; 8] = [0x77; 8];
1689
    if not allU64(&zero[..], 0) {
1690
        return 1;
1691
    }
1692
    if not allU64(&ones[..], 0xffffffffffffffff) {
1693
        return 2;
1694
    }
1695
    if not allU64(&mid[..], 0x1234) {
1696
        return 3;
1697
    }
1698
    if not allU64(&run[..], v) {
1699
        return 4;
1700
    }
1701
    if not intact(&before[..]) or not intact(&after[..]) {
1702
        return 5;
1703
    }
1704
    return 0;
1705
}
1706
/// Record with an array that does not start at a multiple of 8 bytes.
1707
record FrameU64_37: Copy {
1708
    /// Byte before the array.
1709
    head: u8,
1710
    /// Repeated items.
1711
    items: [u64; 37],
1712
    /// Byte after the array.
1713
    tail: u8,
1714
}
1715
1716
/// Check `[u64; 37]` literals in a record literal and in assignments to the field.
1717
fn frameU64_37(seed: u32) -> i32 {
1718
    let v = mkU64(seed);
1719
    let mut f = FrameU64_37 { head: 0x11, items: [v; 37], tail: 0x22 };
1720
    if f.head <> 0x11 or f.tail <> 0x22 or not allU64(&f.items[..], v) {
1721
        return 1;
1722
    }
1723
    set f.items = [0; 37];
1724
    if f.head <> 0x11 or f.tail <> 0x22 or not allU64(&f.items[..], 0) {
1725
        return 2;
1726
    }
1727
    set f.items = [0xffffffffffffffff; 37];
1728
    if f.head <> 0x11 or f.tail <> 0x22 or not allU64(&f.items[..], 0xffffffffffffffff) {
1729
        return 3;
1730
    }
1731
    let g = FrameU64_37 { head: 0x33, items: [0x1234; 37], tail: 0x44 };
1732
    if g.head <> 0x33 or g.tail <> 0x44 or not allU64(&g.items[..], 0x1234) {
1733
        return 4;
1734
    }
1735
    return 0;
1736
}
1737
// Other scalars //
1738
1739
/// Scalar record of two bytes.
1740
record Tag(u16): Copy;
1741
1742
/// Void union that lowers to one byte.
1743
union Color: Copy {
1744
    /// First.
1745
    Red,
1746
    /// Second.
1747
    Green,
1748
    /// Third.
1749
    Blue,
1750
}
1751
1752
/// Check signed items.
1753
fn checkSigned(seed: u32) -> i32 {
1754
    let n: i32 = 0 - 5 - seed as i32;
1755
    let n8 = n as i8;
1756
    let n16 = n as i16;
1757
    let a: [i8; 40] = [-1; 40];
1758
    let b: [i8; 40] = [-128; 40];
1759
    let c: [i8; 40] = [n8; 40];
1760
    for i in 0 .. 40 {
1761
        if a[i] <> -1 or b[i] <> -128 or c[i] <> n8 {
1762
            return 1;
1763
        }
1764
    }
1765
    let d: [i16; 40] = [-2; 40];
1766
    let e: [i16; 40] = [n16; 40];
1767
    for i in 0 .. 40 {
1768
        if d[i] <> -2 or e[i] <> n16 {
1769
            return 2;
1770
        }
1771
    }
1772
    let f: [i32; 40] = [-3; 40];
1773
    let g: [i32; 40] = [n; 40];
1774
    let h: [i64; 40] = [-4; 40];
1775
    for i in 0 .. 40 {
1776
        if f[i] <> -3 or g[i] <> n or h[i] <> -4 {
1777
            return 3;
1778
        }
1779
    }
1780
    return 0;
1781
}
1782
1783
/// Return a constant, for the function pointer items.
1784
fn five() -> u32 {
1785
    return 5;
1786
}
1787
1788
/// Check boolean, scalar record, void union, and function pointer items.
1789
fn checkOther(seed: u32) -> i32 {
1790
    let t: [bool; 40] = [true; 40];
1791
    let u: [bool; 40] = [false; 40];
1792
    let r: [bool; 40] = [seed == 1; 40];
1793
    for i in 0 .. 40 {
1794
        if not t[i] or u[i] or r[i] <> (seed == 1) {
1795
            return 1;
1796
        }
1797
    }
1798
    let tags: [Tag; 40] = [Tag(0x1234); 40];
1799
    let colors: [Color; 40] = [Color::Blue; 40];
1800
    let fns: [fn() -> u32; 40] = [five; 40];
1801
    for i in 0 .. 40 {
1802
        if *tags[i] <> 0x1234 {
1803
            return 2;
1804
        }
1805
        if colors[i] <> Color::Blue {
1806
            return 3;
1807
        }
1808
        if fns[i]() <> 5 {
1809
            return 4;
1810
        }
1811
    }
1812
    return 0;
1813
}
1814
1815
@default fn main() -> i32 {
1816
    let mut r: i32 = 0;
1817
    for seed in 0 .. 3 {
1818
        dirty(seed);
1819
        set r = fillU8_33(seed);
1820
        if r <> 0 {
1821
            return 1 * 10 + r;
1822
        }
1823
        dirty(seed);
1824
        set r = fillU8_34(seed);
1825
        if r <> 0 {
1826
            return 2 * 10 + r;
1827
        }
1828
        dirty(seed);
1829
        set r = fillU8_35(seed);
1830
        if r <> 0 {
1831
            return 3 * 10 + r;
1832
        }
1833
        dirty(seed);
1834
        set r = fillU8_36(seed);
1835
        if r <> 0 {
1836
            return 4 * 10 + r;
1837
        }
1838
        dirty(seed);
1839
        set r = fillU8_37(seed);
1840
        if r <> 0 {
1841
            return 5 * 10 + r;
1842
        }
1843
        dirty(seed);
1844
        set r = fillU8_38(seed);
1845
        if r <> 0 {
1846
            return 6 * 10 + r;
1847
        }
1848
        dirty(seed);
1849
        set r = fillU8_39(seed);
1850
        if r <> 0 {
1851
            return 7 * 10 + r;
1852
        }
1853
        dirty(seed);
1854
        set r = fillU8_40(seed);
1855
        if r <> 0 {
1856
            return 8 * 10 + r;
1857
        }
1858
        dirty(seed);
1859
        set r = fillU8_41(seed);
1860
        if r <> 0 {
1861
            return 9 * 10 + r;
1862
        }
1863
        dirty(seed);
1864
        set r = fillU8_47(seed);
1865
        if r <> 0 {
1866
            return 10 * 10 + r;
1867
        }
1868
        dirty(seed);
1869
        set r = fillU8_48(seed);
1870
        if r <> 0 {
1871
            return 11 * 10 + r;
1872
        }
1873
        dirty(seed);
1874
        set r = fillU8_49(seed);
1875
        if r <> 0 {
1876
            return 12 * 10 + r;
1877
        }
1878
        dirty(seed);
1879
        set r = fillU8_56(seed);
1880
        if r <> 0 {
1881
            return 13 * 10 + r;
1882
        }
1883
        dirty(seed);
1884
        set r = fillU8_57(seed);
1885
        if r <> 0 {
1886
            return 14 * 10 + r;
1887
        }
1888
        dirty(seed);
1889
        set r = fillU8_63(seed);
1890
        if r <> 0 {
1891
            return 15 * 10 + r;
1892
        }
1893
        dirty(seed);
1894
        set r = fillU8_64(seed);
1895
        if r <> 0 {
1896
            return 16 * 10 + r;
1897
        }
1898
        dirty(seed);
1899
        set r = fillU8_65(seed);
1900
        if r <> 0 {
1901
            return 17 * 10 + r;
1902
        }
1903
        dirty(seed);
1904
        set r = fillU8_1023(seed);
1905
        if r <> 0 {
1906
            return 18 * 10 + r;
1907
        }
1908
        dirty(seed);
1909
        set r = fillU8_1024(seed);
1910
        if r <> 0 {
1911
            return 19 * 10 + r;
1912
        }
1913
        dirty(seed);
1914
        set r = fillU8_1025(seed);
1915
        if r <> 0 {
1916
            return 20 * 10 + r;
1917
        }
1918
        dirty(seed);
1919
        set r = frameU8_37(seed);
1920
        if r <> 0 {
1921
            return 21 * 10 + r;
1922
        }
1923
        dirty(seed);
1924
        set r = frameU8_41(seed);
1925
        if r <> 0 {
1926
            return 22 * 10 + r;
1927
        }
1928
        dirty(seed);
1929
        set r = fillU16_33(seed);
1930
        if r <> 0 {
1931
            return 23 * 10 + r;
1932
        }
1933
        dirty(seed);
1934
        set r = fillU16_34(seed);
1935
        if r <> 0 {
1936
            return 24 * 10 + r;
1937
        }
1938
        dirty(seed);
1939
        set r = fillU16_35(seed);
1940
        if r <> 0 {
1941
            return 25 * 10 + r;
1942
        }
1943
        dirty(seed);
1944
        set r = fillU16_36(seed);
1945
        if r <> 0 {
1946
            return 26 * 10 + r;
1947
        }
1948
        dirty(seed);
1949
        set r = fillU16_37(seed);
1950
        if r <> 0 {
1951
            return 27 * 10 + r;
1952
        }
1953
        dirty(seed);
1954
        set r = fillU16_40(seed);
1955
        if r <> 0 {
1956
            return 28 * 10 + r;
1957
        }
1958
        dirty(seed);
1959
        set r = fillU16_63(seed);
1960
        if r <> 0 {
1961
            return 29 * 10 + r;
1962
        }
1963
        dirty(seed);
1964
        set r = fillU16_64(seed);
1965
        if r <> 0 {
1966
            return 30 * 10 + r;
1967
        }
1968
        dirty(seed);
1969
        set r = fillU16_65(seed);
1970
        if r <> 0 {
1971
            return 31 * 10 + r;
1972
        }
1973
        dirty(seed);
1974
        set r = fillU16_1023(seed);
1975
        if r <> 0 {
1976
            return 32 * 10 + r;
1977
        }
1978
        dirty(seed);
1979
        set r = fillU16_1024(seed);
1980
        if r <> 0 {
1981
            return 33 * 10 + r;
1982
        }
1983
        dirty(seed);
1984
        set r = fillU16_1025(seed);
1985
        if r <> 0 {
1986
            return 34 * 10 + r;
1987
        }
1988
        dirty(seed);
1989
        set r = frameU16_37(seed);
1990
        if r <> 0 {
1991
            return 35 * 10 + r;
1992
        }
1993
        dirty(seed);
1994
        set r = fillU32_33(seed);
1995
        if r <> 0 {
1996
            return 36 * 10 + r;
1997
        }
1998
        dirty(seed);
1999
        set r = fillU32_34(seed);
2000
        if r <> 0 {
2001
            return 37 * 10 + r;
2002
        }
2003
        dirty(seed);
2004
        set r = fillU32_35(seed);
2005
        if r <> 0 {
2006
            return 38 * 10 + r;
2007
        }
2008
        dirty(seed);
2009
        set r = fillU32_36(seed);
2010
        if r <> 0 {
2011
            return 39 * 10 + r;
2012
        }
2013
        dirty(seed);
2014
        set r = fillU32_37(seed);
2015
        if r <> 0 {
2016
            return 40 * 10 + r;
2017
        }
2018
        dirty(seed);
2019
        set r = fillU32_40(seed);
2020
        if r <> 0 {
2021
            return 41 * 10 + r;
2022
        }
2023
        dirty(seed);
2024
        set r = fillU32_63(seed);
2025
        if r <> 0 {
2026
            return 42 * 10 + r;
2027
        }
2028
        dirty(seed);
2029
        set r = fillU32_64(seed);
2030
        if r <> 0 {
2031
            return 43 * 10 + r;
2032
        }
2033
        dirty(seed);
2034
        set r = fillU32_65(seed);
2035
        if r <> 0 {
2036
            return 44 * 10 + r;
2037
        }
2038
        dirty(seed);
2039
        set r = fillU32_1023(seed);
2040
        if r <> 0 {
2041
            return 45 * 10 + r;
2042
        }
2043
        dirty(seed);
2044
        set r = fillU32_1024(seed);
2045
        if r <> 0 {
2046
            return 46 * 10 + r;
2047
        }
2048
        dirty(seed);
2049
        set r = fillU32_1025(seed);
2050
        if r <> 0 {
2051
            return 47 * 10 + r;
2052
        }
2053
        dirty(seed);
2054
        set r = frameU32_37(seed);
2055
        if r <> 0 {
2056
            return 48 * 10 + r;
2057
        }
2058
        dirty(seed);
2059
        set r = fillU64_33(seed);
2060
        if r <> 0 {
2061
            return 49 * 10 + r;
2062
        }
2063
        dirty(seed);
2064
        set r = fillU64_34(seed);
2065
        if r <> 0 {
2066
            return 50 * 10 + r;
2067
        }
2068
        dirty(seed);
2069
        set r = fillU64_35(seed);
2070
        if r <> 0 {
2071
            return 51 * 10 + r;
2072
        }
2073
        dirty(seed);
2074
        set r = fillU64_36(seed);
2075
        if r <> 0 {
2076
            return 52 * 10 + r;
2077
        }
2078
        dirty(seed);
2079
        set r = fillU64_37(seed);
2080
        if r <> 0 {
2081
            return 53 * 10 + r;
2082
        }
2083
        dirty(seed);
2084
        set r = fillU64_40(seed);
2085
        if r <> 0 {
2086
            return 54 * 10 + r;
2087
        }
2088
        dirty(seed);
2089
        set r = fillU64_1023(seed);
2090
        if r <> 0 {
2091
            return 55 * 10 + r;
2092
        }
2093
        dirty(seed);
2094
        set r = fillU64_1024(seed);
2095
        if r <> 0 {
2096
            return 56 * 10 + r;
2097
        }
2098
        dirty(seed);
2099
        set r = fillU64_1025(seed);
2100
        if r <> 0 {
2101
            return 57 * 10 + r;
2102
        }
2103
        dirty(seed);
2104
        set r = frameU64_37(seed);
2105
        if r <> 0 {
2106
            return 58 * 10 + r;
2107
        }
2108
        dirty(seed);
2109
        set r = checkSigned(seed);
2110
        if r <> 0 {
2111
            return 59 * 10 + r;
2112
        }
2113
        dirty(seed);
2114
        set r = checkOther(seed);
2115
        if r <> 0 {
2116
            return 60 * 10 + r;
2117
        }
2118
    }
2119
    return 0;
2120
}