wwstage named variadic-gather slots with mkvarargname off a separate varargseq counter, never bumping the shared labelseq that names match labels. cstage names them via mklabel (cmd/w6c/cgen.c:5427,5431), which advances labelseq twice per gather. So by the time main.main reached its `match (wr)`, wwstage's match-label counter ran two behind cstage's (_4/_5/_6 vs _6/_7/_8) — a pure label-numbering divergence that kept fmt cs/ww byte-id failing. Drop varargseq and the mkvarargname helper; call the existing mklabel for the two gather slots, matching cstage's order (vararg_d only when nvar>0, vararg_sl always). The slot names are locals-table keys only — they resolve to BP offsets and never reach the asm — so only the labelseq advance is observable, which is exactly what realigns the downstream match labels. cstage untouched (align wwstage up). This was the match-label half of fmt's divergence; with the earlier compound-assign fix it completes fmt byte-identity. Graduate 777/780/781 to STAGE_CS|STAGE_WW with byte_id, and drop the now-stale (void)asm_byte_identical guard in 777.
12 KiB
12 KiB