The arr[i].f=mk() assign arm had no aggregate-field sub-arm, so a by-value aggregate field receive fell to the scalar default (one MOVQ, dropping DX/CX) — silent on BOTH stages (byte-id blind). Add a dual-site symmetric in-cap N_CALL arm mirroring C2c (c83a340): scratch-first materialise AX/DX/CX, then word-copy to (fi.foff+k*8) within &arr[i], sizing from the natural field size fi.fsz (not slotsize). Rule-7 LOUD-STOP for the three cases the in-cap GP path cannot transport: over-cap sret (#11c/#234), a float-bearing field whose eightbyte classifies SSE (#11/#165), and a 3/5/6/7-byte sub-8 tail the single narrow tail MOV cannot express (the general cascade tail is the shared C2c/#11 follow-up, task #10). Value-asserting pins (poison-seeded, redden under each stage's independent revert) plus cfail pins for the three loud-stops.
Contained to the indexed base + in-cap call rhs; arr[i].f=src (#11b) and over-cap (#11c) are separate.
16 lines
684 B
Plaintext
16 lines
684 B
Plaintext
//ww:error "over-cap (sret) aggregate field receive"
|
|
// #11c/#234 tripwire: an OVER-cap (>24B, sret-returning) CALL into an aggregate
|
|
// field of an indexed element. The result is written via a dest pointer, not the
|
|
// AX/DX/CX cursor, so the in-cap materialise cannot handle it -> both stages
|
|
// LOUD-STOP until the const-idx sret-into-field path is wired (task #8, rule 7).
|
|
// SUCCESS = the over-cap stop regressed to a 1-word silent drop (cs!=ww).
|
|
package main;
|
|
type big = struct { a:i64, b:i64, c:i64, d:i64 };
|
|
type s = struct { f: big, g: i64 };
|
|
fn mk() big = { return big{a=1i64,b=2i64,c=3i64,d=4i64}; };
|
|
export fn main() i32 = {
|
|
let arr: [2]s;
|
|
arr[1].f = mk();
|
|
return 0;
|
|
};
|