`type vs = *vt; fn(s: vs) s.field` linked-failed in wwstage with `undefined reference to field' — cgdot read lc.tnode.kind without first walking N_TNAME aliases, so lkind stayed N_TNAME (not the underlying N_TPTR), structlookupchain missed (`vs` isn't a struct alias), and the lookup fell through to the SB-global fallback that emits `MOVQ <field>(SB), AX`. Mirror cstage type_chase_named (cmd/w6c/cgen.c:144-155) via an aliaslookup loop, stopping at struct aliases so the existing direct-struct N_TNAME arm stays byte-id with pre-fix #22 callers. LOOP (not single-peel) — Phase-N builds N_TNAME chains (project_tinfo_lossy_nominal), depth-2+ aliases require iteration. Inner peel on the pointee is unnecessary: the existing structlookupchain already walks N_TNAME chains via aliaslookup (cgenutil.ww:1266-1276); row 4 of probe 769 proves the inner-chain depth-3 path stays green without an explicit inner peel. Probe test/wcc/769_dot_aliased_ptr.c covers 4 rows (fn-param read, let-binding read, double-alias receiver, pointee-alias chain), per-row runtime + byte-id gates. Files inline two sibling bugs surfaced during impl (cgassign write-side silent-drop, chained-N_DOT spine link-fail) plus a cstage checker assignability gap on chain-depth-2 aliases — all out-of-scope per rule 11 split.
57 KiB
57 KiB