Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,262
    • Issues 4,262
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 419
    • Merge Requests 419
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #7165

Closed
Open
Opened Aug 20, 2012 by alang@trac-alang

"match_co bailing out" messages and compiler crash

$ cat > Blah.hs
{-# LANGUAGE GADTs #-}

module Blah where

blah :: (dd ~ (Double, Double)) => dd -> dd
blah (ax, bx)
    | ax < bx = blah (bx, ax)
    | otherwise = (0,0)

$ cat > Meh.hs
module Meh where

import Blah

meh = blah (0,0)

If we compile with -O2, in 2 separate calls to ghc, we get:

$ ghc -O2 Blah.hs
[1 of 1] Compiling Blah             ( Blah.hs, Blah.o )
match_co baling out
    <(ghc-prim:GHC.Types.Double{(w) tc 3u},
      ghc-prim:GHC.Types.Double{(w) tc 3u})>
match_co baling out
    <(ghc-prim:GHC.Types.Double{(w) tc 3u},
      ghc-prim:GHC.Types.Double{(w) tc 3u})>
match_co baling out
    <(ghc-prim:GHC.Types.Double{(w) tc 3u},
      ghc-prim:GHC.Types.Double{(w) tc 3u})>
match_co baling out
    <(ghc-prim:GHC.Types.Double{(w) tc 3u},
      ghc-prim:GHC.Types.Double{(w) tc 3u})>
match_co baling out
    <(ghc-prim:GHC.Types.Double{(w) tc 3u},
      ghc-prim:GHC.Types.Double{(w) tc 3u})>
match_co baling out
    <(ghc-prim:GHC.Types.Double{(w) tc 3u},
      ghc-prim:GHC.Types.Double{(w) tc 3u})>

$ ghc -O2 Meh.hs
[2 of 2] Compiling Meh              ( Meh.hs, Meh.o )
ghc: panic! (the 'impossible' happened)
  (GHC version 7.4.2 for x86_64-unknown-linux):
	tcIfaceType
    Refl
        (ghc-prim:GHC.Types.Double{(w) tc 3u},
         ghc-prim:GHC.Types.Double{(w) tc 3u})

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
Trac metadata
Trac field Value
Version 7.7
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Assignee
Assign to
7.6.1
Milestone
7.6.1
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#7165