[GHC] #14024: typechecker tests T13594 T13822 tc269 T13780c failing in devel2 flavour (was: typechecker tests T13594 T13822 tc269 failing in devel2 flavour)

GHC ghc-devs at haskell.org
Wed Aug 2 18:48:37 UTC 2017


#14024: typechecker tests T13594 T13822 tc269 T13780c failing in devel2 flavour
-------------------------------------+-------------------------------------
        Reporter:  duog              |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Test Suite        |              Version:  8.3
      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:                    |
-------------------------------------+-------------------------------------

Old description:

> The tests T13594 T13822 tc269 are failing for me with
> BuildFlavour=devel2. They pass with BuildFlavour=validate.
>
> I have had a brief look to see if I could fix, but this is beyond my
> current capabilities.
>
> There is a comment in tc269.hs saying that it doesn't typecheck, however
> that looks to be out of date?
>
> test output pasted below:
> {{{
> =====> tc269(normal) 1 of 3 [0, 0, 0]
> cd "./typecheck/should_compile/tc269.run" &&  "/home/doug/ghc-
> dev/devel2/inplace/bin/ghc-stage2" -c tc269.hs -dcore-lint -dcmm-lint
> -no-user-package-db -rtsopts -fno-warn-missed-specialisations -fshow-
> warning-groups -fdiagnostics-color=never -fno-diagnostics-show-caret
> -dno-debug-output -fno-warn-incomplete-patterns
> Compile failed (exit code 1) errors were:
> ghc-stage2: panic! (the 'impossible' happened)
>   (GHC version 8.3.20170723 for x86_64-unknown-linux):
>         ASSERT failed!
>   in_scope InScope {k_aSm}
>   tenv [aRJ :-> k_aSm[sk:2]]
>   tenvFVs [aSg :-> k_aSg[tau:1], aSm :-> k_aSm[sk:2]]
>   cenv []
>   cenvFVs []
>   tys [k_aRJ[sk:1] -> *]
>   cos []
>   Call stack:
>       CallStack (from HasCallStack):
>         prettyCurrentCallStack, called at
> compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
>         callStackDoc, called at compiler/utils/Outputable.hs:1188:22 in
> ghc:Outputable
>         assertPprPanic, called at compiler/types/TyCoRep.hs:2089:56 in
> ghc:TyCoRep
>         checkValidSubst, called at compiler/types/TyCoRep.hs:2122:29 in
> ghc:TyCoRep
>         substTy, called at compiler/typecheck/TcCanonical.hs:673:36 in
> ghc:TcCanonical
>   Call stack:
>       CallStack (from HasCallStack):
>         prettyCurrentCallStack, called at
> compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
>         callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in
> ghc:Outputable
>         pprPanic, called at compiler/utils/Outputable.hs:1186:5 in
> ghc:Outputable
>         assertPprPanic, called at compiler/types/TyCoRep.hs:2089:56 in
> ghc:TyCoRep
>         checkValidSubst, called at compiler/types/TyCoRep.hs:2122:29 in
> ghc:TyCoRep
>         substTy, called at compiler/typecheck/TcCanonical.hs:673:36 in
> ghc:TcCanonical
>
> Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
>

> *** unexpected failure for tc269(normal)
> =====> T13594(normal) 2 of 3 [0, 1, 0]
> cd "./typecheck/should_compile/T13594.run" &&  "/home/doug/ghc-
> dev/devel2/inplace/bin/ghc-stage2" -c T13594.hs -dcore-lint -dcmm-lint
> -no-user-package-db -rtsopts -fno-warn-missed-specialisations -fshow-
> warning-groups -fdiagnostics-color=never -fno-diagnostics-show-caret
> -dno-debug-output -fno-warn-incomplete-patterns
> Compile failed (exit code 1) errors were:
> ghc-stage2: panic! (the 'impossible' happened)
>   (GHC version 8.3.20170723 for x86_64-unknown-linux):
>         ASSERT failed!
>   {$trModule = Module (TrNameS "main"#) (TrNameS "Bug"#),
>    !x_a1o5 = (1, 2)}
>   [x]
>   Call stack:
>       CallStack (from HasCallStack):
>         prettyCurrentCallStack, called at
> compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
>         callStackDoc, called at compiler/utils/Outputable.hs:1188:22 in
> ghc:Outputable
>         assertPprPanic, called at compiler/deSugar/DsBinds.hs:89:71 in
> ghc:DsBinds
>   Call stack:
>       CallStack (from HasCallStack):
>         prettyCurrentCallStack, called at
> compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
>         callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in
> ghc:Outputable
>         pprPanic, called at compiler/utils/Outputable.hs:1186:5 in
> ghc:Outputable
>         assertPprPanic, called at compiler/deSugar/DsBinds.hs:89:71 in
> ghc:DsBinds
>
> Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
>

> *** unexpected failure for T13594(normal)
> =====> T13822(normal) 3 of 3 [0, 2, 0]
> cd "./typecheck/should_compile/T13822.run" &&  "/home/doug/ghc-
> dev/devel2/inplace/bin/ghc-stage2" -c T13822.hs -dcore-lint -dcmm-lint
> -no-user-package-db -rtsopts -fno-warn-missed-specialisations -fshow-
> warning-groups -fdiagnostics-color=never -fno-diagnostics-show-caret
> -dno-debug-output -fno-warn-incomplete-patterns
> Compile failed (exit code 1) errors were:
> ghc-stage2: panic! (the 'impossible' happened)
>   (GHC version 8.3.20170723 for x86_64-unknown-linux):
>         ASSERT failed!
>   Bad coercion hole {a1bG}: (I (x_a19g |> Sym (Ty
>                                                  (Sym cobox))_N) |>
> D:R:IK[0])
>                             (I (x_a19g |> Sym (Ty (Sym cobox))_N) |>
> D:R:IK[0])
>                             nominal
>                             <(I (x_a19g |> Sym (Ty (Sym cobox))_N) |>
> D:R:IK[0])>_N
>                             I (x_a19g[ssk:3] |> Sym (Ty (Sym cobox))_N)
>                             I (x_a19g[ssk:3] |> Sym (Ty (Sym cobox))_N)
>                             nominal
>   Call stack:
>       CallStack (from HasCallStack):
>         prettyCurrentCallStack, called at
> compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
>         callStackDoc, called at compiler/utils/Outputable.hs:1188:22 in
> ghc:Outputable
>         assertPprPanic, called at compiler/typecheck/TcMType.hs:304:105
> in ghc:TcMType
>   Call stack:
>       CallStack (from HasCallStack):
>         prettyCurrentCallStack, called at
> compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
>         callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in
> ghc:Outputable
>         pprPanic, called at compiler/utils/Outputable.hs:1186:5 in
> ghc:Outputable
>         assertPprPanic, called at compiler/typecheck/TcMType.hs:304:105
> in ghc:TcMType
>
> Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
>

> *** unexpected failure for T13822(normal)
>
> Unexpected results from:
> TEST="T13594 T13822 tc269"
> }}}

New description:

 The tests T13594 T13822 tc269 are failing for me with BuildFlavour=devel2.
 They pass with BuildFlavour=validate.

 I have had a brief look to see if I could fix, but this is beyond my
 current capabilities.

 test output pasted below:
 {{{
 =====> tc269(normal) 1 of 3 [0, 0, 0]
 cd "./typecheck/should_compile/tc269.run" &&  "/home/doug/ghc-
 dev/devel2/inplace/bin/ghc-stage2" -c tc269.hs -dcore-lint -dcmm-lint -no-
 user-package-db -rtsopts -fno-warn-missed-specialisations -fshow-warning-
 groups -fdiagnostics-color=never -fno-diagnostics-show-caret -dno-debug-
 output -fno-warn-incomplete-patterns
 Compile failed (exit code 1) errors were:
 ghc-stage2: panic! (the 'impossible' happened)
   (GHC version 8.3.20170723 for x86_64-unknown-linux):
         ASSERT failed!
   in_scope InScope {k_aSm}
   tenv [aRJ :-> k_aSm[sk:2]]
   tenvFVs [aSg :-> k_aSg[tau:1], aSm :-> k_aSm[sk:2]]
   cenv []
   cenvFVs []
   tys [k_aRJ[sk:1] -> *]
   cos []
   Call stack:
       CallStack (from HasCallStack):
         prettyCurrentCallStack, called at
 compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
         callStackDoc, called at compiler/utils/Outputable.hs:1188:22 in
 ghc:Outputable
         assertPprPanic, called at compiler/types/TyCoRep.hs:2089:56 in
 ghc:TyCoRep
         checkValidSubst, called at compiler/types/TyCoRep.hs:2122:29 in
 ghc:TyCoRep
         substTy, called at compiler/typecheck/TcCanonical.hs:673:36 in
 ghc:TcCanonical
   Call stack:
       CallStack (from HasCallStack):
         prettyCurrentCallStack, called at
 compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
         callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in
 ghc:Outputable
         pprPanic, called at compiler/utils/Outputable.hs:1186:5 in
 ghc:Outputable
         assertPprPanic, called at compiler/types/TyCoRep.hs:2089:56 in
 ghc:TyCoRep
         checkValidSubst, called at compiler/types/TyCoRep.hs:2122:29 in
 ghc:TyCoRep
         substTy, called at compiler/typecheck/TcCanonical.hs:673:36 in
 ghc:TcCanonical

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug


 *** unexpected failure for tc269(normal)
 =====> T13594(normal) 2 of 3 [0, 1, 0]
 cd "./typecheck/should_compile/T13594.run" &&  "/home/doug/ghc-
 dev/devel2/inplace/bin/ghc-stage2" -c T13594.hs -dcore-lint -dcmm-lint
 -no-user-package-db -rtsopts -fno-warn-missed-specialisations -fshow-
 warning-groups -fdiagnostics-color=never -fno-diagnostics-show-caret -dno-
 debug-output -fno-warn-incomplete-patterns
 Compile failed (exit code 1) errors were:
 ghc-stage2: panic! (the 'impossible' happened)
   (GHC version 8.3.20170723 for x86_64-unknown-linux):
         ASSERT failed!
   {$trModule = Module (TrNameS "main"#) (TrNameS "Bug"#),
    !x_a1o5 = (1, 2)}
   [x]
   Call stack:
       CallStack (from HasCallStack):
         prettyCurrentCallStack, called at
 compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
         callStackDoc, called at compiler/utils/Outputable.hs:1188:22 in
 ghc:Outputable
         assertPprPanic, called at compiler/deSugar/DsBinds.hs:89:71 in
 ghc:DsBinds
   Call stack:
       CallStack (from HasCallStack):
         prettyCurrentCallStack, called at
 compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
         callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in
 ghc:Outputable
         pprPanic, called at compiler/utils/Outputable.hs:1186:5 in
 ghc:Outputable
         assertPprPanic, called at compiler/deSugar/DsBinds.hs:89:71 in
 ghc:DsBinds

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug


 *** unexpected failure for T13594(normal)
 =====> T13822(normal) 3 of 3 [0, 2, 0]
 cd "./typecheck/should_compile/T13822.run" &&  "/home/doug/ghc-
 dev/devel2/inplace/bin/ghc-stage2" -c T13822.hs -dcore-lint -dcmm-lint
 -no-user-package-db -rtsopts -fno-warn-missed-specialisations -fshow-
 warning-groups -fdiagnostics-color=never -fno-diagnostics-show-caret -dno-
 debug-output -fno-warn-incomplete-patterns
 Compile failed (exit code 1) errors were:
 ghc-stage2: panic! (the 'impossible' happened)
   (GHC version 8.3.20170723 for x86_64-unknown-linux):
         ASSERT failed!
   Bad coercion hole {a1bG}: (I (x_a19g |> Sym (Ty
                                                  (Sym cobox))_N) |>
 D:R:IK[0])
                             (I (x_a19g |> Sym (Ty (Sym cobox))_N) |>
 D:R:IK[0])
                             nominal
                             <(I (x_a19g |> Sym (Ty (Sym cobox))_N) |>
 D:R:IK[0])>_N
                             I (x_a19g[ssk:3] |> Sym (Ty (Sym cobox))_N)
                             I (x_a19g[ssk:3] |> Sym (Ty (Sym cobox))_N)
                             nominal
   Call stack:
       CallStack (from HasCallStack):
         prettyCurrentCallStack, called at
 compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
         callStackDoc, called at compiler/utils/Outputable.hs:1188:22 in
 ghc:Outputable
         assertPprPanic, called at compiler/typecheck/TcMType.hs:304:105 in
 ghc:TcMType
   Call stack:
       CallStack (from HasCallStack):
         prettyCurrentCallStack, called at
 compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
         callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in
 ghc:Outputable
         pprPanic, called at compiler/utils/Outputable.hs:1186:5 in
 ghc:Outputable
         assertPprPanic, called at compiler/typecheck/TcMType.hs:304:105 in
 ghc:TcMType

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug


 *** unexpected failure for T13822(normal)

 Unexpected results from:
 TEST="T13594 T13822 tc269"

 Actual stderr output differs from expected:
 diff -uw "./dependent/should_fail/T13780c.run/T13780c.stderr.normalised"
 "./dependent/should_fail/T13780c.run/T13780c.comp.stderr.normalised"
 --- ./dependent/should_fail/T13780c.run/T13780c.stderr.normalised
 2017-08-02 18:34:10.711466876 +0000
 +++ ./dependent/should_fail/T13780c.run/T13780c.comp.stderr.normalised
 2017-08-02 18:34:10.711466876 +0000
 @@ -1,12 +1,14 @@
  [1 of 2] Compiling T13780b          ( T13780b.hs, T13780b.o )
  [2 of 2] Compiling T13780c          ( T13780c.hs, T13780c.o )
 +ghc: panic! (the 'impossible' happened)
 +  (GHC version 8.3.20170802 for x86_64-unknown-linux):
 +       piResultTy
 +  k_a1dY[tau:1]
 +  'True
 +  Call stack:
 +      CallStack (from HasCallStack):
 +        callStackDoc, called at
 compiler/utils/Outputable.hs:<line>:<column> in <package-id>:Outputable
 +        pprPanic, called at compiler/types/Type.hs:<line>:<column> in
 <package-id>:Type
 +        piResultTy, called at compiler/types/Type.hs:<line>:<column> in
 <package-id>:Type

 -T13780c.hs:11:16:
 -     Expected kind ‘Sing _’, but ‘SFalse’ has kind ‘Sing 'False’
 -     In the third argument of ‘ElimBool’, namely ‘SFalse’
 -      In the type family declaration for ‘ElimBool’
 -
 -T13780c.hs:12:16:
 -     Expected kind ‘Sing _1’, but ‘STrue’ has kind ‘Sing 'True’
 -     In the third argument of ‘ElimBool’, namely ‘STrue’
 -      In the type family declaration for ‘ElimBool’
 +Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
 *** unexpected failure for T13780c(normal)
 }}}

--

Comment (by duog):

 Rescind my question as to whether the tc269.hs comments are out of date, I
 read them again and they are clearly not.

 Add T13780c failure, which is happening on master at commit
 d74983ef0c4a5b47a53d2821f8be9ebbf86e9257.
 It seems quite related to me, but I'll move it to another ticket if you
 would prefer.

 Note the unhelpful stack trace. I suspect that since this only happens
 with ASSERTs enabled, and since piResultTy has a HasDebugCallStack
 constraint, that piResultTy is panicking inside an ASSERT and the
 HasDebugCallStack machinery is breaking in this case? If you agree, and
 would expect it to work here, I would be happy to look into fixing it.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14024#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list