[GHC] #9567: tc124 fails as '*** Core Lint errors : in result of Simplifier ***' in WAY=optasm
#9567: tc124 fails as '*** Core Lint errors : in result of Simplifier ***' in WAY=optasm -------------------------------------+------------------------------------- Reporter: slyfox | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.9 Keywords: | Operating System: Architecture: x86_64 (amd64) | Unknown/Multiple Difficulty: Unknown | Type of failure: GHC Blocked By: | rejects valid program Related Tickets: | Test Case: tc124 | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- ghc-HEAD: {{{ $ make fulltest TEST="tc124" WAY=optasm =====> tc124(optasm) 3136 of 4101 [0, 0, 0] cd ./typecheck/should_compile && '/home/slyfox/dev/git/ghc- validate/inplace/bin/ghc-stage2' -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-db -rtsopts -fno-ghci-history -c tc124.hs -O -fasm -fno-warn-incomplete-patterns >tc124.comp.stderr 2>&1 Compile failed (status 256) errors were: *** Core Lint errors : in result of Simplifier *** <no location info>: Warning: In the type ‘a_12 -> a_aia -> a_aia’ @ a_12 is out of scope *** Offending Program *** Foo.g :: Foo.T -> Foo.T [LclIdX, Arity=1, Str=DmdType, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [20] 40 30}] Foo.g = \ (t_ahr :: Foo.T) -> case t_ahr of _ [Occ=Dead] { Foo.T ds_dlB ds_dlC -> Foo.T ds_dlB (\ (@ a_ai4) (@ b_ai5) _ [Occ=Dead] (y_aht :: b_ai5) -> y_aht) } ... }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9567> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#9567: tc124 fails as '*** Core Lint errors : in result of Simplifier ***' in WAY=optasm -------------------------------------+------------------------------------- Reporter: slyfox | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.9 Resolution: | Keywords: Operating System: | Architecture: x86_64 (amd64) Unknown/Multiple | Difficulty: Unknown Type of failure: GHC | Blocked By: rejects valid program | Related Tickets: Test Case: tc124 | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by slyfox): What is odd is it does not fail in norma mode. Only in the following modes (today's -HEAD): {{{ Unexpected failures: typecheck/should_compile tc124 [exit code non-0] (hpc,optasm,optllvm) }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9567#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#9567: tc124 fails as '*** Core Lint errors : in result of Simplifier ***' in WAY=optasm -------------------------------------+------------------------------------- Reporter: slyfox | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.9 Resolution: | Keywords: Operating System: | Architecture: x86_64 (amd64) Unknown/Multiple | Difficulty: Unknown Type of failure: GHC | Blocked By: rejects valid program | Related Tickets: Test Case: tc124 | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by slyfox): Slightly more trimmed example causing lint crash on the following commandline: {{{ inplace/bin/ghc-stage2 -fforce-recomp -dcore-lint -dcmm-lint -dno-debug- output -no-user-package-db -rtsopts -fno-ghci-history -c tc124.hs -O -fasm -fno-warn-incomplete-patterns *** Core Lint errors : in result of Simplifier *** <no location info>: Warning: In the type ‘a_12 -> a_anm -> a_anm’ @ a_12 is out of scope *** Offending Program *** }}} {{{#!hs {-# LANGUAGE RankNTypes #-} module Foo where data T = T { t1 :: forall a. a -> a } -- Test pattern bindings for polymorphic fields f :: T -> (Int,Char) f t = let T { t1 = my_t1 } = t in (my_t1 3, my_t1 'c') }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9567#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#9567: tc124 fails as '*** Core Lint errors : in result of Simplifier ***' in WAY=optasm -------------------------------------+------------------------------------- Reporter: slyfox | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.9 Resolution: | Keywords: Operating System: | Architecture: x86_64 (amd64) Unknown/Multiple | Difficulty: Unknown Type of failure: GHC | Blocked By: rejects valid program | Related Tickets: Test Case: tc124 | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by simonpj): Thanks. The bug is in the `ApplyTo` case of `simplUtils.contInputType`, which does not work right for type arguments. This needs a little thought. Thanks for boiling it down so much. Simon -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9567#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#9567: tc124 fails as '*** Core Lint errors : in result of Simplifier ***' in WAY=optasm -------------------------------------+------------------------------------- Reporter: slyfox | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.9 Resolution: | Keywords: Operating System: | Architecture: x86_64 (amd64) Unknown/Multiple | Difficulty: Unknown Type of failure: GHC | Blocked By: rejects valid program | Related Tickets: Test Case: tc124 | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by Simon Peyton Jones <simonpj@…>): In [changeset:"b8392ae76a6d39c57be94b5ba041c450ab479e2b/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="b8392ae76a6d39c57be94b5ba041c450ab479e2b" Fix an obscure but terrible bug in the simplifier (Trac #9567) The issue was that contInputType simply gave the wrong answer for type applications. There was no way to fix contInputType; it just didn't have enough information. So I did this: * Split the ApplyTo constructor of SimplUtils.SimplCont into ApplyToVal ApplyToTy I used record syntax for them; we should do this for some of the other constructors too. * The latter carries a sc_hole_ty, which is the type of the continuation's "hole" * Maintaining this type meant that I had do to something similar for SimplUtils.ArgSpec. * I renamed contInputType to contHoleType for consistency. * I did a bit of refactoring around the call to tryRules in Simplify, which was jolly confusing before. The resulting code is quite nice now. And it has the additional merit that it works. The tests are simply tc124 and T7891 with -O enabled. }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9567#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#9567: tc124 fails as '*** Core Lint errors : in result of Simplifier ***' in WAY=optasm -------------------------------------+------------------------------------- Reporter: slyfox | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.9 Resolution: fixed | Keywords: Operating System: | Architecture: x86_64 (amd64) Unknown/Multiple | Difficulty: Unknown Type of failure: GHC | Blocked By: rejects valid program | Related Tickets: Test Case: | typecheck/should_compile/tc124, | T7891 | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => closed * testcase: tc124 => typecheck/should_compile/tc124, T7891 * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9567#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC