// Positive case: import both modules, dispatch through the explicit // module qualifier. Each module's ping = bare-value + helper() (CALL // N_IDENT) + fpi() (which exercises LEAQ N_IDENT via `let h = helper`). // `p1` / `p2` pin the LEAQ N_DOT path (`let p = mod.ping` for fn // rvalue) — cgdot must emit `LEAQ mod.ping(SB), AX`, not // `MOVQ ping(SB), AX`. Pre-#12 wwstage cgdot fell through to the // latter and `p1() / p2()` jumped into mid-prologue garbage. // // mod1.ping = 3 + 11 + 11 = 25 // mod2.ping = 5 + 13 + 13 = 31 // p1() = mod1.ping = 25 // p2() = mod2.ping = 31 // total = 112 package fnlabelmangle; import mod1; import mod2; fn main() i32 = { let p1: fn() i32 = mod1.ping; let p2: fn() i32 = mod2.ping; return mod1.ping() + mod2.ping() + p1() + p2(); };