gcc-2.95.3 internal error on head/MachOp.hs
Simon Marlow
simonmar at microsoft.com
Thu Sep 9 07:01:54 EDT 2004
(ignore my earlier message, I didn't noticed you'd posted more info).
I don't know if perhaps the missing 'default' branch on that final
switch has confused gcc. If you look at the code, then you see that the
default can never happen.
Perhaps try adding a dummy default case to that switch, and see if that
helps gcc? If so, we can fix it up in PprC.hs.
Cheers,
Simon
On 09 September 2004 10:09, Donald Bruce Stewart wrote:
> dons:
>> A start on the gcc-2.95.3 issue provoked by MachOp.hs in the head, on
>> the openbsd nightly builds. I haven't solved this, but I thought I'd
>> put out some info, in case someone else can spot it, or has some
>> hints...
>
> And we have a minimal test case :) Maybe this will help.
>
> module M where
>
> f :: DT -> Bool
> f a = case a of -- any less cases and we don't trigger it
> A -> True
> C -> True
> D -> True
> E -> True
> F -> True
> J -> True
> M -> True
> N -> True
> _other -> False
>
> -- any less constructors and we don't trigger it
> data DT = A | B | C | D | E | F | G | H | I | J
> | K | L | M | N | O | P | Q | R
>
> Which provokes, using the stage1 compiler from the head:
>
> manzano$ ~/head/i386-unknown-openbsd/ghc/compiler/ghc-inplace
> -c -keep-tmp-files -fvia-C T.hs /tmp/ghc10780.hc: In function
> `s1Eo_ret': /tmp/ghc10780.hc:859: Internal compiler error in
> `build_insn_chain', at global.c:1756 Please submit a full bug
> report. See <URL:http://www.gnu.org/software/gcc/bugs.html>
> for instructions.
>
> And the .hc function that gcc aborts in (full .hc at
> http://www.cse.unsw.edu.au/~dons/ghc10780.hc):
>
> static StgWord s1Eo_info[] = {
> 0x0, 0x24
> };
>
> EI_(GHCziBase_False_closure);
> EI_(GHCziBase_True_closure);
> IF_(s1Eo_ret) {
> W_ _c1Ey;
> FB_
> _c1Ey = (W_)((*((StgWord16*)((*R1.p) + (-0x2)))));
> if (_c1Ey < 0x5) goto _c1EH;
> if (_c1Ey < 0xc) goto _c1EI;
> if (_c1Ey < 0xd) goto _c1EJ;
> if (_c1Ey != 0xd) goto _c1EK;
> R1.p = (P_)(W_)GHCziBase_True_closure;
> Sp=Sp+1;
> JMP_(*((P_)((*Sp) + (-0x14))));
> _c1EK:
> R1.p = (P_)(W_)GHCziBase_False_closure;
> Sp=Sp+1;
> JMP_(*((P_)((*Sp) + (-0x10))));
> _c1EL:
> R1.p = (P_)(W_)GHCziBase_True_closure;
> Sp=Sp+1;
> JMP_(*((P_)((*Sp) + (-0x14))));
> _c1EM:
> R1.p = (P_)(W_)GHCziBase_True_closure;
> Sp=Sp+1;
> JMP_(*((P_)((*Sp) + (-0x14))));
> _c1EN:
> R1.p = (P_)(W_)GHCziBase_True_closure;
> Sp=Sp+1;
> JMP_(*((P_)((*Sp) + (-0x14))));
> _c1EO:
> R1.p = (P_)(W_)GHCziBase_True_closure;
> Sp=Sp+1;
> JMP_(*((P_)((*Sp) + (-0x14))));
> _c1EP:
> if (_c1Ey != 0x5) goto _c1EK;
> R1.p = (P_)(W_)GHCziBase_True_closure;
> Sp=Sp+1;
> JMP_(*((P_)((*Sp) + (-0x14))));
> _c1EJ:
> R1.p = (P_)(W_)GHCziBase_True_closure;
> Sp=Sp+1;
> JMP_(*((P_)((*Sp) + (-0x14))));
> _c1EI:
> if (_c1Ey < 0x9) goto _c1EP;
> if (_c1Ey != 0x9) goto _c1EK;
> R1.p = (P_)(W_)GHCziBase_True_closure;
> Sp=Sp+1;
> JMP_(*((P_)((*Sp) + (-0x14))));
> _c1EH:
> switch (_c1Ey) {
> case 0x0: goto _c1EL;
> case 0x1: goto _c1EK;
> case 0x2: goto _c1EM;
> case 0x3: goto _c1EN;
> case 0x4: goto _c1EO;
> }
> FE_
> }
> _______________________________________________
> Cvs-ghc mailing list
> Cvs-ghc at haskell.org
> http://www.haskell.org/mailman/listinfo/cvs-ghc
More information about the Cvs-ghc
mailing list