interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / seed / ng / front / cases / for_latch_i8.om

11 lines · 399 bytes Raw Blame History
1note for_latch_i8: a signed for counter that the body writes to its maximum. The latch adds 1 and that add
2note overflows: omc traps 1 (exit 101). front-ir lowered the latch as an unchecked add, so the counter wrapped
3note to -128 and the loop ran on to its bound (trap 4, exit 104). Bug hunt, ledger L1060.
4fn main to int
5n = ulong 0
6for k byte 100 bound 1000
7n = add n 1
8k = 127
9end
10ret int n
11end