
#7814: panic in PPC NCG --------------------------------+------------------------------------------- Reporter: heisenbug | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.7 | Keywords: Os: Unknown/Multiple | Architecture: powerpc Failure: Building GHC failed | Blockedby: Blocking: | Related: --------------------------------+------------------------------------------- Comment(by heisenbug): This function alone triggers the panic: {{{ ==================== Post CPS Cmm ==================== [stg_sel_0_upd_entry() // [R1] { info_tbl: [(cc, label: stg_sel_0_upd_info rep:tag:23 HeapRep { ThunkSel 0 }), (ce, label: block_ce_info rep:StackRep [])] stack_info: arg_space: 4 updfr_space: Just 4 } {offset cc: _c1::P32 = R1; if ((Sp + -12) < SpLim) goto cj; else goto cl; cj: R1 = _c1::P32; call (stg_gc_enter_1)(R1) args: 4, res: 0, upd: 4; cl: I32[Sp - 8] = stg_upd_frame_info; P32[Sp - 4] = _c1::P32; _cf::P32 = I32[_c1::P32 + 8]; if (_cf::P32 & 3 != 0) goto co; else goto cn; cn: I32[Sp - 12] = ce; R1 = _cf::P32; Sp = Sp - 12; call (I32[_cf::P32])(R1) returns to ce, args: 4, res: 4, upd: 12; ce: Sp = Sp + 12; _cf::P32 = R1; goto co; co: R1 = I32[_cf::P32 & (-4) + 4]; Sp = Sp - 8; call stg_ap_0_fast(R1) args: 12, res: 0, upd: 12; } }] ==================== Optimised Cmm ==================== stg_sel_0_upd_entry() // [R1] { [(cb, stg_sel_0_upd_info: const 0; const 1507328;), (ce, block_ce_info: const 0; const 2097152;)] } {offset cb: _cc::P32 = R1; if ((Sp + -12) < SpLim) goto cj; else goto cl; cj: R1 = _cc::P32; call (I32[BaseReg - 12])(R1) args: 4, res: 0, upd: 4; cl: I32[Sp - 8] = I32[PicBaseReg + .LC_stg_upd_frame_info-.LCTOC1]; P32[Sp - 4] = _cc::P32; _cf::P32 = I32[_cc::P32 + 8]; if (_cf::P32 & 3 != 0) goto co; else goto cn; cn: I32[Sp - 12] = I32[PicBaseReg + .LC_block_ce_info-.LCTOC1]; R1 = _cf::P32; Sp = Sp - 12; call (I32[_cf::P32])(R1) returns to ce, args: 4, res: 4, upd: 12; ce: Sp = Sp + 12; _cf::P32 = R1; goto co; co: R1 = I32[_cf::P32 & (-4) + 4]; Sp = Sp - 8; call (I32[PicBaseReg + .LC_stg_ap_0_fast-.LCTOC1])(R1) args: 12, res: 0, upd: 12; } } }}} -ddump-asm dies not show anything -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7814#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler