Files
ww/test/wcc/data/r805_compound_bits_shr/case.ww
Hojun-Cho f6628b985e test: migrate 24 residual carriers into the fixture corpus
Audit-driven migrate-and-retire wave (one read-only auditor per
carrier batch, verdicts row-checked through the full corpus gate):
every retired carrier's assertions are now owned by declarative
fixtures or an existing owner. 238 new fixtures land (corpus 1,239 ->
1,477; cells 2,954), covering enum/str/slice/tagged array elements,
inferred-length arrays, global slice/str zero-init and literals,
global array/pointer field reads and stores, struct-literal slice
fields, struct returns, float arithmetic, size/int limits, sort and
log-vstream behavior, place-addressed stores, and append places.
Rejection rows STRENGTHEN the old nonzero-exit checks to required
diagnostic fragments; all byte-id claims fold into the blanket
test-data-byteid sweep (now 1,142 compared, 0 pinned-divergent).
Four carriers were fully redundant with existing fixtures/lang tests
(749, 722, 765, and 771's byteid rows) and retire without new rows.
Native carriers 171 -> 147 (residual 135 -> 111).
2026-08-08 01:29:15 +09:00

21 lines
615 B
Plaintext

//ww:run-exit 48
package main;
type t = struct { s: int, u: size, n: i64, m: i64 };
fn ands(ts: *[]t, i: size) void = { (*ts)[i].m &= 6; };
fn xors(ts: *[]t, i: size) void = { (*ts)[i].m ^= 3; };
fn sars(ts: *[]t, i: size) void = { (*ts)[i].s >>= 2; };
fn shrs(ts: *[]t, i: size) void = { (*ts)[i].u >>= 1; };
export fn main() i32 = {
let ts: []t = [];
append(ts, t { s = -16, u = 8, n = 0, m = 7 });
ands(&ts, 0);
if (ts[0].m != 6) { return 1; };
xors(&ts, 0);
if (ts[0].m != 5) { return 2; };
sars(&ts, 0);
if (ts[0].s != -4) { return 3; };
shrs(&ts, 0);
if (ts[0].u != 4) { return 4; };
return 48;
};