0f2587d294ee444654f34b22e2def56100b5c3ae
An inline slice of a struct `[N]T`-field passed DIRECTLY as a call argument (`rd(x.o[lo:hi])`) materialized the slice .ptr from the field VALUE, not its ADDRESS: the pushargs/pushargsrev N_SLICE inline builder's non-ident else-arm did plain cgexpr(base), so the N_DOT field auto-derefs (MOVL field,AX used as .ptr) -> callee derefs garbage -> SEGFAULT. The let-init / assign-rhs / return / hoist-to-local contexts already routed through the cgslice #252 choke-point; only this call-arg builder kept a private duplicate. cs==ww both segfaulted identically pre-fix (gate-blind). Fix (symmetric both stages): - route the else-arm through cg_dotbase_addr / dotbaseaddr (the cgslice #252 choke-point: array-field-gated, so `[]T`/str/`*T` fields fall through to cgexpr; chained inner `o.p.m` handled via its #253 arm); - extend the N_IDENT-only esz gate to N_DOT bases, taking the element width from the checker-stamped base->type (rule-13 type table), so non-u8 call-arg slices scale stride. Before: `MOVL -8(BP),AX; PUSHQ AX` (field value as .ptr). After: `LEAQ -8(BP),AX; PUSHQ AX` (field address). cs==ww byte-identical. Helper note: used dotbaseaddr (not dotchainaddr as first scoped) — it is the established cgslice choke-point and is array-field-gated, so a slice/ str-typed field base keeps the correct cgexpr header-ptr load; bare dotchainaddr lacks that gate and would mis-emit the field address for those. dotbaseaddr already handles the chained `o.p.m` inner via #253. Tests: test/wcc/949 gains 6 call-arg rows (u8, i32-esz-stride, via-*struct, chained, + hoist-to-local and bare-local-array controls), each run- correctness AND cs==ww byte-id. PROOF-GREP residual: the tagged-union-element indexed-STORE arm (cgen.c:~4972 / cgenexpr.ww:~5024) is the same N_DOT-base auto-deref shape, still unrouted in BOTH stages (symmetric, segfaults) — a distinct consumption axis filed separately; NOT fixed here.
Description
No description provided
Languages
C
89.4%
Python
7.2%
Makefile
2.3%
Shell
0.8%
Assembly
0.3%