diff --git a/Makefile b/Makefile index 477bf1d1..38fa65a1 100644 --- a/Makefile +++ b/Makefile @@ -583,8 +583,7 @@ DATABYTEID_EXPECTED_MIN = 911 # When a compiler fix lands the entry fails demanding graduation out of # this list rather than silently widening coverage. Tracked with the #59 # divergence family. -DATABYTEID_DIVERGED = r71_tagged_return_scratch_mixed \ - r76_typeeq_fn_diff_arity r76_typeeq_fn_diff_param_type \ +DATABYTEID_DIVERGED = r76_typeeq_fn_diff_arity r76_typeeq_fn_diff_param_type \ r76_typeeq_fn_io_vtable_shape r76_typeeq_fn_variadic_vs_fixed \ r940_str_forrange_arg $(if $(DATABYTEID_FILES),,$(error test-byteid: empty data corpus)) diff --git a/selfhost/cmd/wcc/cgenutil.ww b/selfhost/cmd/wcc/cgenutil.ww index 82b01803..95b97444 100644 --- a/selfhost/cmd/wcc/cgenutil.ww +++ b/selfhost/cmd/wcc/cgenutil.ww @@ -4842,7 +4842,9 @@ fn cgwidentaggedstorebp(c: *cgen, dst: *syntax.tinfo, src: *syntax.node, slot_of let gtag: i32 = taggedvariantindext(c, dt, src); if (gtag < 0) { gtag = 0; }; if (aggargsrcaddr(c, src, "SI")) { - let gtot: i32 = gsi.totsize; + // Natural size, not slot-padded (see the + // local-ident twin below; cstage su->size). + let gtot: i32 = copysrcnatsize(c, src); let gk: i32 = 0; for (gk + 8 <= gtot) { emitline("\tMOVQ\t"); @@ -4913,7 +4915,10 @@ fn cgwidentaggedstorebp(c: *cgen, dst: *syntax.tinfo, src: *syntax.node, slot_of let lc: *local = localfindnode(c, src.str); let soff: i32 = 0; if (lc != nil) { soff = lc.off; }; - let stotal: i32 = si.totsize; + // Copy the NATURAL size (cstage su->size): the slot- + // padded totsize would MOVQ the source slot's dirty + // pad bytes over the zero-fill just established. + let stotal: i32 = copysrcnatsize(c, src); let ki: i32 = 0; for (ki + 8 <= stotal) { emitline("\tMOVQ\t");