diff --git a/test/wcc/800_append_wide_elem.c b/test/wcc/800_append_wide_elem.c index 2e432237..d7036e68 100644 --- a/test/wcc/800_append_wide_elem.c +++ b/test/wcc/800_append_wide_elem.c @@ -63,6 +63,15 @@ * tagged_ident_src | append of ALREADY-TAGGED locals | 42 * | (i64 + bool members) — the widener's | * | already-tagged source path. | + * struct_eight_appends | 8 struct-lit appends of the getopt | 15 + * | option shape ({rune,str} = 32B), | + * | full-width readback of element 7 — | + * | the >6-element OOB regression pin | + * | (getopt's deleted helper fed a stale | + * | hardcoded membsz=24: 8-slot grow was | + * | 192B while writes strode 32; the | + * | builtin derives 32 from the type | + * | table, MOVQ $32, SI). | * struct_call_loudstop | append(xs, f()) struct-from-call is | BUILD_FAIL * | the deferred source shape — must | * | fail LOUD on both stages (rule-7), | @@ -281,6 +290,23 @@ static const struct row rows[] = { "};\n", 42 }, + { "struct_eight_appends", + "package main;\n" + "type option = struct { flag: rune, value: str };\n" + "export fn main() i32 = {\n" + "\tlet opts: []option = [];\n" + "\tappend(opts, option { flag = 'a', value = \"v0\" });\n" + "\tappend(opts, option { flag = 'b', value = \"v1\" });\n" + "\tappend(opts, option { flag = 'c', value = \"v2\" });\n" + "\tappend(opts, option { flag = 'd', value = \"v3\" });\n" + "\tappend(opts, option { flag = 'e', value = \"v4\" });\n" + "\tappend(opts, option { flag = 'f', value = \"v5\" });\n" + "\tappend(opts, option { flag = 'g', value = \"v6\" });\n" + "\tappend(opts, option { flag = 'h', value = \"seventh\" });\n" + "\treturn (opts[7].value.len + opts.len): i32;\n" + "};\n", + 15 }, + { "struct_call_loudstop", "package main;\n" "type pt = struct { x: i32, y: i32, z: i64 };\n"