fb53b4798b0583684161cdeea5d85bf463aad599
cgreturn's forwardtagged detection was keyed on the CALLEE NAME (N_IDENT/N_DOT only via fnretlookupmod), so any other callee shape fell through to the variant-tag synthesis path — clobbering the just-returned AX/DX/CX/R8 tagged-ABI words. The deref-call case `(*r)(...)` (impl-e1-resume STOP, 994 w6c_ww byte-id red) was the proximate trigger. Replace with a TYPE-BASED predicate over the checker-stamped tinfos (rhs.type_ vs c.fnret.type_), mirroring cstage cgen.c:8007 passthrough. Peel TY_NAMED on both sides then identity-check the underlying TY_TAGGED — sufficient for the NAMED case because tinfocache memoizes per typedecl (#191 lineage). Variant-pointer fallback walks the params chain when identity fails so anonymous unions like the cross-module (i32 | void) shared between strings.byteindex and bytes.index still forward correctly; full recursive tinfo structural-eq is gated by #178 (typeeqast's TY_TAGGED arm conservatively returns false today). Probe 770_return_tagged_forward covers 6 rows — IDENT forward, widen non-matching, deref-call (the bug), scalar (sanity), nested call, cross-module forward — each gated on cstage runtime + wwstage runtime + cs.s == ww.s byte-identity.
Description
No description provided
Languages
C
89.4%
Python
7.2%
Makefile
2.3%
Shell
0.8%
Assembly
0.3%