From: Sergei Trofimovich <slyfox@gentoo.org> 83a003fcaec93dbfd5b46837f2bf3353412b9877 introduced optimization which likes to know if a reg is a hardware reg via 'globalRegMaybe': But --enable-unregisterised does not define that function: ghc-stage1: panic! (the 'impossible' happened) (GHC version 7.9.20140419 for x86_64-unknown-linux): globalRegMaybe not defined for this platform CC: Simon Marlow <marlowsd@gmail.com> Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> --- includes/CodeGen.Platform.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/CodeGen.Platform.hs b/includes/CodeGen.Platform.hs index 3d6dd41..1e7c17d 100644 --- a/includes/CodeGen.Platform.hs +++ b/includes/CodeGen.Platform.hs @@ -743,7 +743,11 @@ globalRegMaybe CurrentNursery = Just (RealRegSingle REG_CurrentNursery # endif globalRegMaybe _ = Nothing #else +# ifdef NO_REGS +globalRegMaybe _ = Nothing +# else globalRegMaybe = panic "globalRegMaybe not defined for this platform" +# endif /* !NO_REGS */ #endif freeReg :: RegNo -> FastBool -- 1.9.2