[GHC] #14680: GHC 8.4.1-alpha panics when optimizing function using getTag and tagToEnum#

#14680: GHC 8.4.1-alpha panics when optimizing function using getTag and tagToEnum# -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: highest | Milestone: 8.4.1 Component: Compiler | Version: 8.4.1-alpha1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Compile-time Unknown/Multiple | crash or panic Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- I originally observed this panic in [https://travis-ci.org/haskell-compat /deriving-compat/jobs/329948624#L804 this Travis build]. The panic can be reduced to this file: {{{#!hs {-# LANGUAGE MagicHash #-} {-# LANGUAGE TypeFamilies #-} module Bug where import GHC.Base (getTag) import GHC.Exts (Int(..), tagToEnum#) data family TyFamilyEnum data instance TyFamilyEnum = TyFamilyEnum1 | TyFamilyEnum2 | TyFamilyEnum3 suc :: TyFamilyEnum -> TyFamilyEnum suc a_aaf8 = case getTag a_aaf8 of a_aaf9 -> if 2 == I# a_aaf9 then error "succ{TyFamilyEnum}: tried to take `succ' of last tag in enumeration" else case I# a_aaf9 + 1 of I# i_aafa -> tagToEnum# i_aafa :: TyFamilyEnum }}} In GHC 8.2.2, compiling this with optimization works fine. But in GHC 8.4.1-alpha, it panics: {{{ $ /opt/ghc/8.4.1/bin/ghc -fforce-recomp -O1 Bug.hs [1 of 1] Compiling Bug ( Bug.hs, Bug.o ) ghc: panic! (the 'impossible' happened) (GHC version 8.4.0.20171222 for x86_64-unknown-linux): Prelude.!!: index too large }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14680 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14680: GHC 8.4.1-alpha panics when optimizing function using getTag and tagToEnum# -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: highest | Milestone: 8.4.1 Component: Compiler | Version: 8.4.1-alpha1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by mpickering): * cc: dfeuer (added) Comment: I think David was looking at this at some point? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14680#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14680: GHC 8.4.1-alpha panics when optimizing function using getTag and tagToEnum# -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: highest | Milestone: 8.4.1 Component: Compiler | Version: 8.4.1-alpha1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * cc: simonpj (added) Comment: This regression was introduced in commi 193664d42dbceadaa1e4689dfa17ff1cf5a405a0 (`Re-engineer caseRules to add tagToEnum/dataToTag`). cc'ing simonpj, who authored this. From glancing at that diff, I can at least see why this happening. It's due to [http://git.haskell.org/ghc.git/blob/c65104e1a6875f7879db87877848cc35363c1bf3... this line]: {{{#!hs get_con ty tag = tyConDataCons (tyConAppTyCon ty) !! tag }}} But we're dealing with a data family here, so oughtn't we be using the //representation// tycon here, not `tyConAppTyCon`? It's likely that `tyConAppTyCon ty` is returning an empty list when `ty` is headed by a data family, which would explain the panic. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14680#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14680: GHC 8.4.1-alpha panics when optimizing function using getTag and tagToEnum# -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: highest | Milestone: 8.4.1 Component: Compiler | Version: 8.4.1-alpha1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): I had a go at this, but am stuck. I thought fixing this would be a matter of propagating the `FamInstEnvs` down to `get_con` and using that to look up the tycon, as in the following patch: {{{#!diff diff --git a/compiler/codeGen/StgCmmExpr.hs b/compiler/codeGen/StgCmmExpr.hs index 3fcc935..a912979 100644 --- a/compiler/codeGen/StgCmmExpr.hs +++ b/compiler/codeGen/StgCmmExpr.hs @@ -625,7 +625,7 @@ cgAlts gc_plan bndr (AlgAlt tycon) alts ; return AssignedDirectly } -cgAlts _ _ _ _ = panic "cgAlts" +cgAlts _ _ alt _ = pprPanic "cgAlts" (ppr alt) -- UbxTupAlt and PolyAlt have only one alternative diff --git a/compiler/ghc.cabal.in b/compiler/ghc.cabal.in index 1e3447b..05ea7ca 100644 --- a/compiler/ghc.cabal.in +++ b/compiler/ghc.cabal.in @@ -434,6 +434,7 @@ Library WorkWrap WwLib FamInst + FamInstLookup Inst TcAnnotations TcArrows diff --git a/compiler/prelude/PrelRules.hs b/compiler/prelude/PrelRules.hs index db79589..9449747 100644 --- a/compiler/prelude/PrelRules.hs +++ b/compiler/prelude/PrelRules.hs @@ -33,6 +33,8 @@ import CoreSyn import MkCore import Id import Literal +import FamInstEnv ( FamInstEnvs ) +import FamInstLookup import CoreOpt ( exprIsLiteral_maybe ) import PrimOp ( PrimOp(..), tagToEnumKey ) import TysWiredIn @@ -1404,6 +1406,7 @@ match_smallIntegerTo _ _ _ _ _ = Nothing -- | Match the scrutinee of a case and potentially return a new scrutinee and a -- function to apply to each literal alternative. caseRules :: DynFlags + -> FamInstEnvs -> CoreExpr -- Scrutinee -> Maybe ( CoreExpr -- New scrutinee , AltCon -> AltCon -- How to fix up the alt pattern @@ -1419,14 +1422,14 @@ caseRules :: DynFlags -- fixup_altcon[con] bs -> let b = mk_orig[b] in rhs; -- ... } -caseRules dflags (App (App (Var f) v) (Lit l)) -- v `op` x# +caseRules dflags _ (App (App (Var f) v) (Lit l)) -- v `op` x# | Just op <- isPrimOpId_maybe f , Just x <- isLitValue_maybe l , Just adjust_lit <- adjustDyadicRight op x = Just (v, tx_lit_con dflags adjust_lit , \v -> (App (App (Var f) (Var v)) (Lit l))) -caseRules dflags (App (App (Var f) (Lit l)) v) -- x# `op` v +caseRules dflags _ (App (App (Var f) (Lit l)) v) -- x# `op` v | Just op <- isPrimOpId_maybe f , Just x <- isLitValue_maybe l , Just adjust_lit <- adjustDyadicLeft x op @@ -1434,25 +1437,25 @@ caseRules dflags (App (App (Var f) (Lit l)) v) -- x# `op` v , \v -> (App (App (Var f) (Lit l)) (Var v))) -caseRules dflags (App (Var f) v ) -- op v +caseRules dflags _ (App (Var f) v ) -- op v | Just op <- isPrimOpId_maybe f , Just adjust_lit <- adjustUnary op = Just (v, tx_lit_con dflags adjust_lit , \v -> App (Var f) (Var v)) -- See Note [caseRules for tagToEnum] -caseRules dflags (App (App (Var f) type_arg) v) +caseRules dflags _ (App (App (Var f) type_arg) v) | Just TagToEnumOp <- isPrimOpId_maybe f = Just (v, tx_con_tte dflags , \v -> (App (App (Var f) type_arg) (Var v))) -- See Note [caseRules for dataToTag] -caseRules _ (App (App (Var f) (Type ty)) v) -- dataToTag x +caseRules _ fam_envs (App (App (Var f) (Type ty)) v) -- dataToTag x | Just DataToTagOp <- isPrimOpId_maybe f - = Just (v, tx_con_dtt ty + = Just (v, tx_con_dtt fam_envs ty , \v -> App (App (Var f) (Type ty)) (Var v)) -caseRules _ _ = Nothing +caseRules _ _ _ = Nothing tx_lit_con :: DynFlags -> (Integer -> Integer) -> AltCon -> AltCon @@ -1506,13 +1509,19 @@ tx_con_tte dflags (DataAlt dc) tag = dataConTagZ dc tx_con_tte _ alt = pprPanic "caseRules" (ppr alt) -tx_con_dtt :: Type -> AltCon -> AltCon -tx_con_dtt _ DEFAULT = DEFAULT -tx_con_dtt ty (LitAlt (MachInt i)) = DataAlt (get_con ty (fromInteger i)) -tx_con_dtt _ alt = pprPanic "caseRules" (ppr alt) - -get_con :: Type -> ConTagZ -> DataCon -get_con ty tag = tyConDataCons (tyConAppTyCon ty) !! tag +tx_con_dtt :: FamInstEnvs -> Type -> AltCon -> AltCon +tx_con_dtt _ _ DEFAULT = DEFAULT +tx_con_dtt fam_envs ty (LitAlt (MachInt i)) = + DataAlt (get_con fam_envs ty (fromInteger i)) +tx_con_dtt _ _ alt = pprPanic "caseRules" (ppr alt) + +get_con :: FamInstEnvs -> Type -> ConTagZ -> DataCon +get_con fam_envs ty tag + | Just (tc, tys) <- tcSplitTyConApp_maybe ty + , (rep_tc, _, _) <- tcLookupDataFamInst fam_envs tc tys + = tyConDataCons rep_tc !! tag + | otherwise + = pprPanic "get_con" (ppr ty) {- Note [caseRules for tagToEnum] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/compiler/simplCore/SimplUtils.hs b/compiler/simplCore/SimplUtils.hs index d86adbb..252ebdb 100644 --- a/compiler/simplCore/SimplUtils.hs +++ b/compiler/simplCore/SimplUtils.hs @@ -65,6 +65,7 @@ import Outputable import Pair import PrelRules import FastString ( fsLit ) +import FamInstEnv ( FamInstEnvs ) import Control.Monad ( when ) import Data.List ( sortBy ) @@ -2012,6 +2013,7 @@ There are some wrinkles mkCase, mkCase1, mkCase2, mkCase3 :: DynFlags + -> FamInstEnvs -> OutExpr -> OutId -> OutType -> [OutAlt] -- Alternatives in standard (increasing) order -> SimplM OutExpr @@ -2020,7 +2022,8 @@ mkCase, mkCase1, mkCase2, mkCase3 -- 1. Merge Nested Cases -------------------------------------------------- -mkCase dflags scrut outer_bndr alts_ty ((DEFAULT, _, deflt_rhs) : outer_alts) +mkCase dflags fam_envs scrut outer_bndr alts_ty + ((DEFAULT, _, deflt_rhs) : outer_alts) | gopt Opt_CaseMerge dflags , (ticks, Case (Var inner_scrut_var) inner_bndr _ inner_alts) <- stripTicksTop tickishFloatable deflt_rhs @@ -2048,7 +2051,7 @@ mkCase dflags scrut outer_bndr alts_ty ((DEFAULT, _, deflt_rhs) : outer_alts) -- precedence over e2 as the value for A! ; fmap (mkTicks ticks) $ - mkCase1 dflags scrut outer_bndr alts_ty merged_alts + mkCase1 dflags fam_envs scrut outer_bndr alts_ty merged_alts } -- Warning: don't call mkCase recursively! -- Firstly, there's no point, because inner alts have already had @@ -2056,13 +2059,15 @@ mkCase dflags scrut outer_bndr alts_ty ((DEFAULT, _, deflt_rhs) : outer_alts) -- Secondly, if you do, you get an infinite loop, because the bindCaseBndr -- in munge_rhs may put a case into the DEFAULT branch! -mkCase dflags scrut bndr alts_ty alts = mkCase1 dflags scrut bndr alts_ty alts +mkCase dflags fam_envs scrut bndr alts_ty alts = + mkCase1 dflags fam_envs scrut bndr alts_ty alts -------------------------------------------------- -- 2. Eliminate Identity Case -------------------------------------------------- -mkCase1 _dflags scrut case_bndr _ alts@((_,_,rhs1) : _) -- Identity case +mkCase1 _dflags _fam_envs scrut case_bndr _ + alts@((_,_,rhs1) : _) -- Identity case | all identity_alt alts = do { tick (CaseIdentity case_bndr) ; return (mkTicks ticks $ re_cast scrut rhs1) } @@ -2101,27 +2106,28 @@ mkCase1 _dflags scrut case_bndr _ alts@((_,_,rhs1) : _) -- Identity case re_cast scrut (Cast rhs co) = Cast (re_cast scrut rhs) co re_cast scrut _ = scrut -mkCase1 dflags scrut bndr alts_ty alts = mkCase2 dflags scrut bndr alts_ty alts +mkCase1 dflags fam_envs scrut bndr alts_ty alts = + mkCase2 dflags fam_envs scrut bndr alts_ty alts -------------------------------------------------- -- 2. Scrutinee Constant Folding -------------------------------------------------- -mkCase2 dflags scrut bndr alts_ty alts +mkCase2 dflags fam_envs scrut bndr alts_ty alts | -- See Note [Scrutinee Constant Folding] case alts of -- Not if there is just a DEFAULT alternative [(DEFAULT,_,_)] -> False _ -> True , gopt Opt_CaseFolding dflags - , Just (scrut', tx_con, mk_orig) <- caseRules dflags scrut + , Just (scrut', tx_con, mk_orig) <- caseRules dflags fam_envs scrut = do { bndr' <- newId (fsLit "lwild") (exprType scrut') ; alts' <- mapM (tx_alt tx_con mk_orig bndr') alts - ; mkCase3 dflags scrut' bndr' alts_ty $ + ; mkCase3 dflags fam_envs scrut' bndr' alts_ty $ add_default (re_sort alts') } | otherwise - = mkCase3 dflags scrut bndr alts_ty alts + = mkCase3 dflags fam_envs scrut bndr alts_ty alts where -- We need to keep the correct association between the scrutinee and its -- binder if the latter isn't dead. Hence we wrap rhs of alternatives with @@ -2174,7 +2180,7 @@ mkCase2 dflags scrut bndr alts_ty alts -------------------------------------------------- -- Catch-all -------------------------------------------------- -mkCase3 _dflags scrut bndr alts_ty alts +mkCase3 _dflags _fam_envs scrut bndr alts_ty alts = return (Case scrut bndr alts_ty alts) {- diff --git a/compiler/simplCore/Simplify.hs b/compiler/simplCore/Simplify.hs index b123055..1e4d9d5 100644 --- a/compiler/simplCore/Simplify.hs +++ b/compiler/simplCore/Simplify.hs @@ -2482,9 +2482,10 @@ simplAlts env0 scrut case_bndr alts cont' ; -- pprTrace "simplAlts" (ppr case_bndr $$ ppr alts_ty $$ ppr alts_ty' $$ ppr alts $$ ppr cont') $ ; let alts_ty' = contResultType cont' + ; fam_envs <- getFamEnvs -- See Note [Avoiding space leaks in OutType] ; seqType alts_ty' `seq` - mkCase (seDynFlags env0) scrut' case_bndr' alts_ty' alts' } + mkCase (seDynFlags env0) fam_envs scrut' case_bndr' alts_ty' alts' } ------------------------------------ diff --git a/compiler/typecheck/FamInst.hs b/compiler/typecheck/FamInst.hs index 956a412..812a67d 100644 --- a/compiler/typecheck/FamInst.hs +++ b/compiler/typecheck/FamInst.hs @@ -17,6 +17,7 @@ import GhcPrelude import HscTypes import FamInstEnv +import FamInstLookup import InstEnv( roughMatchTcs ) import Coercion import TcEvidence @@ -469,38 +470,6 @@ getFamInsts hpt_fam_insts mod tcInstNewTyCon_maybe :: TyCon -> [TcType] -> Maybe (TcType, TcCoercion) tcInstNewTyCon_maybe = instNewTyCon_maybe --- | Like 'tcLookupDataFamInst_maybe', but returns the arguments back if --- there is no data family to unwrap. --- Returns a Representational coercion -tcLookupDataFamInst :: FamInstEnvs -> TyCon -> [TcType] - -> (TyCon, [TcType], Coercion) -tcLookupDataFamInst fam_inst_envs tc tc_args - | Just (rep_tc, rep_args, co) - <- tcLookupDataFamInst_maybe fam_inst_envs tc tc_args - = (rep_tc, rep_args, co) - | otherwise - = (tc, tc_args, mkRepReflCo (mkTyConApp tc tc_args)) - -tcLookupDataFamInst_maybe :: FamInstEnvs -> TyCon -> [TcType] - -> Maybe (TyCon, [TcType], Coercion) --- ^ Converts a data family type (eg F [a]) to its representation type (eg FList a) --- and returns a coercion between the two: co :: F [a] ~R FList a. -tcLookupDataFamInst_maybe fam_inst_envs tc tc_args - | isDataFamilyTyCon tc - , match : _ <- lookupFamInstEnv fam_inst_envs tc tc_args - , FamInstMatch { fim_instance = rep_fam@(FamInst { fi_axiom = ax - , fi_cvs = cvs }) - , fim_tys = rep_args - , fim_cos = rep_cos } <- match - , let rep_tc = dataFamInstRepTyCon rep_fam - co = mkUnbranchedAxInstCo Representational ax rep_args - (mkCoVarCos cvs) - = ASSERT( null rep_cos ) -- See Note [Constrained family instances] in FamInstEnv - Just (rep_tc, rep_args, co) - - | otherwise - = Nothing - -- | 'tcTopNormaliseNewTypeTF_maybe' gets rid of top-level newtypes, -- potentially looking through newtype /instances/. -- }}} Unfortunately, that just causes the panic to change: {{{ $ inplace/bin/ghc-stage2 -fforce-recomp -O1 ../Bug.hs [1 of 1] Compiling Bug ( ../Bug.hs, ../Bug.o ) ghc-stage2: panic! (the 'impossible' happened) (GHC version 8.5.20180117 for x86_64-unknown-linux): cgAlts Polymorphic Call stack: CallStack (from HasCallStack): callStackDoc, called at compiler/utils/Outputable.hs:1150:37 in ghc:Outputable pprPanic, called at compiler/codeGen/StgCmmExpr.hs:628:20 in ghc:StgCmmExpr }}} I have no idea what's going on in `StgCmmExpr`, so I'm out of ideas. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14680#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14680: GHC 8.4.1-alpha panics when optimizing function using getTag and tagToEnum# -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: highest | Milestone: 8.4.1 Component: Compiler | Version: 8.4.1-alpha1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): It turns out that this is actually generating ill typed Core, as demonstrated in this Core Lint error: {{{ $ inplace/bin/ghc-stage2 -O1 -fforce-recomp -dcore-lint ../Bug.hs [1 of 1] Compiling Bug ( ../Bug.hs, ../Bug.o ) *** Core Lint errors : in result of Simplifier *** <no location info>: warning: In a case alternative: (TyFamilyEnum3) In a case alternative, data constructor isn't in scrutinee type: Scrutinee type constructor: TyFamilyEnum Data con: TyFamilyEnum3 *** Offending Program *** <elided> suc :: TyFamilyEnum -> TyFamilyEnum [LclIdX, Arity=1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [20] 33 0}] suc = \ (a_aaf8_awR :: TyFamilyEnum) -> case a_aaf8_awR `cast` (D:R:TyFamilyEnum0[0] :: (TyFamilyEnum :: *) ~R# (R:TyFamilyEnum :: *)) of nt_s2jO { __DEFAULT -> case nt_s2jO `cast` (Sym (D:R:TyFamilyEnum0[0]) :: (R:TyFamilyEnum :: *) ~R# (TyFamilyEnum :: *)) of lwild_s2k1 { __DEFAULT -> case dataToTag# @ TyFamilyEnum lwild_s2k1 of a_aaf9_awS { __DEFAULT -> (tagToEnum# @ R:TyFamilyEnum (+# a_aaf9_awS 1#)) `cast` (Sym (D:R:TyFamilyEnum0[0]) :: (R:TyFamilyEnum :: *) ~R# (TyFamilyEnum :: *)) }; TyFamilyEnum3 -> let { a_aaf9_awS :: Int# [LclId, Unf=OtherCon []] a_aaf9_awS = 2# } in lvl_s2jL } } *** End of Offense *** }}} I've highlighted the relevant part, which is the Core for `suc`. Notice how it first `cast`s the argument from type `TyFamilyEnum` (the data family tycon) to type `R:TyFamilyEnum` (the representation tycon). This part is definitely correct, since you can't pattern-match on the argument unless it's at the representation type. But immediately after this `cast`, it proceeds to `cast` it //again//, from type `R:TyFamilyEnum` back to `TyFamilyEnum`! This makes the whole `case` expression following it ill typed, and likely results in shenanigans later during compilation. Now my question is: where is this extra cast coming from? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14680#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14680: GHC 8.4.1-alpha panics when optimizing function using getTag and tagToEnum# -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: highest | Milestone: 8.4.1 Component: Compiler | Version: 8.4.1-alpha1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): Ryan and I talked by Skype. It seems that `dataToTag#` is truly polymorphic (works for values of any type), and GHC happily accepts {{{ get :: forall a. a -> Int# get x = getTag x }}} `dataToTag#` will never crash; it'll just fetch a tag from its argument's info table. Given that, the Right Thing is just to make sure that the optimisatio rule in `PrelRules` has enough side conditions. Currently it says {{{ caseRules _ (App (App (Var f) (Type ty)) v) -- dataToTag x | Just DataToTagOp <- isPrimOpId_maybe f = Just (v, tx_con_dtt ty , \v -> App (App (Var f) (Type ty)) (Var v)) }}} But it should also check that `ty` is a proper data type; if not, return `Nothing` (i.e. don't optimise). Easy. Ryan is on the job. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14680#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14680: GHC 8.4.1-alpha panics when optimizing function using getTag and tagToEnum# -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: patch Priority: highest | Milestone: 8.4.1 Component: Compiler | Version: 8.4.1-alpha1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4371 Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => patch * differential: => Phab:D4371 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14680#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14680: GHC 8.4.1-alpha panics when optimizing function using getTag and tagToEnum#
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: patch
Priority: highest | Milestone: 8.4.1
Component: Compiler | Version: 8.4.1-alpha1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
crash or panic | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D4371
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#14680: GHC 8.4.1-alpha panics when optimizing function using getTag and tagToEnum# -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: closed Priority: highest | Milestone: 8.4.1 Component: Compiler | Version: 8.4.1-alpha1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4371 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed Comment: Merged to `ghc-8.4` as b7f9139ccddf4a1ca5839cd50ad8dba4f5e2e1dc. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14680#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC