[GHC] #8682: GHC compilation bug

GHC ghc-devs at haskell.org
Sun Jan 19 17:17:19 UTC 2014


#8682: GHC compilation bug
----------------------------------+---------------------------------------
       Reporter:  guest           |             Owner:
           Type:  bug             |            Status:  new
       Priority:  normal          |         Milestone:
      Component:  Compiler        |           Version:  7.4.1
       Keywords:                  |  Operating System:  Linux
   Architecture:  x86_64 (amd64)  |   Type of failure:  Compile-time crash
     Difficulty:  Unknown         |         Test Case:
     Blocked By:                  |          Blocking:
Related Tickets:                  |
----------------------------------+---------------------------------------
 Description:

 Attempted to compile a relatively small & simple Haskell program. GHC
 crashes unpon compilation.

 Source code in its entirety:

     import System.Environment

     data NestedList a = Elem a | List [NestedList a]
       deriving (read)

     main = do
       args <- getArgs
       print . flatten . read $ concat args

     flatten :: NestedList a -> [a]
     flatten Elem x = [x]
     flatten List x = concatMap flatten x

 Console Log in it's entirety:

 user at computer:~/path/to/file/$ ghc -v file.hs
 Glasgow Haskell Compiler, Version 7.4.1, stage 2 booted by GHC version
 7.4.1
 Using binary package database: /usr/lib/ghc/package.conf.d/package.cache
 Using binary package database:
 /home/user/.ghc/x86_64-linux-7.4.1/package.conf.d/package.cache
 wired-in package ghc-prim mapped to ghc-
 prim-0.2.0.0-c2ff696e5b8ec4d4b2bc2e42085fe471
 wired-in package integer-gmp mapped to integer-
 gmp-0.4.0.0-3cccac07aef8e27023f605c1f45bdf74
 wired-in package base mapped to
 base-4.5.0.0-40b99d05fae6a4eea95ea69e6e0c9702
 wired-in package rts mapped to builtin_rts
 wired-in package template-haskell mapped to template-
 haskell-2.7.0.0-8c8cd20e21666657195efabced685fe1
 wired-in package dph-seq not found.
 wired-in package dph-par not found.
 Hsc static flags: -static
 *** Chasing dependencies:
 Chasing modules from: *prob07.hs
 Stable obj: []
 Stable BCO: []
 Ready for upsweep
   [NONREC
       ModSummary {
          ms_hs_date = Sun Jan 19 10:47:44 CST 2014
          ms_mod = main:Main,
          ms_textual_imps = [import (implicit) Prelude,
                             import System.Environment]
          ms_srcimps = []
       }]
 *** Deleting temp files:
 Deleting:
 compile: input file prob07.hs
 Created temporary directory: /tmp/ghc6732_0
 *** Checking old interface for main:Main:
 [1 of 1] Compiling Main             ( prob07.hs, prob07.o )
 *** Parser:
 *** Renamer/typechecker:
 *** Deleting temp files:
 Deleting: /tmp/ghc6732_0/ghc6732_0.s
 Warning: deleting non-existent /tmp/ghc6732_0/ghc6732_0.s
 *** Deleting temp dirs:
 Deleting: /tmp/ghc6732_0
 ghc: panic! (the 'impossible' happened)
   (GHC version 7.4.1 for x86_64-unknown-linux):
         nameModule read{tv aaf}

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

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


More information about the ghc-tickets mailing list