Opened 11 years ago

Closed 11 years ago

#2820 closed bug (duplicate)

GADT code from RepLib causes panic!

Reported by: ben.kavanagh Owned by:
Priority: normal Milestone:
Component: Compiler Version: 6.10.1
Keywords: panic, GADT Cc:
Operating System: Linux Architecture: x86
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

While compiling RepLib generics library I encountered a ghc panic. I have isolated the failure to very small example that does some simple computation over a heterogenous list. I have attached the following files

RepMinimal.hs. This is the problem reduced to small example. The function that seems to cause the problem is "badFunction". If I remove this function the file compiles.

RepSmall.hs. This is a trimmed down core of RepLib where the original problem occurs. I only include it if someone looking at the bug wants to know what this code was used for.

below is the output of ghc run.


[ben@lapdog RepLib]$ ghc -v RepCombined3.hs Glasgow Haskell Compiler, Version 6.10.1, for Haskell 98, stage 2 booted by GHC version 6.10.1 Using package config file: /usr/lib/ghc-6.10.1/./package.conf hiding package base-3.0.3.0 to avoid conflict with later version base-4.0.0.0 wired-in package ghc-prim mapped to ghc-prim-0.1.0.0 wired-in package integer mapped to integer-0.1.0.0 wired-in package base mapped to base-4.0.0.0 wired-in package rts mapped to rts-1.0 wired-in package haskell98 mapped to haskell98-1.0.1.0 wired-in package syb mapped to syb-0.1.0.0 wired-in package template-haskell mapped to template-haskell-2.3.0.0 wired-in package dph-seq mapped to dph-seq-0.3 wired-in package dph-par mapped to dph-par-0.3 Hsc static flags: -static Created temporary directory: /tmp/ghc3284_0 * Checking old interface for main:Data.RepLib.RepCombined: * Parser: * Renamer/typechecker: * Desugar:

Result size = 176

* Simplify:

Result size = 283 Result size = 283

* Tidy Core:

Result size = 283

* CorePrep:

Result size = 465

* Stg2Stg: * CodeGen: * CodeOutput: * Deleting temp files: Deleting: /tmp/ghc3284_0/ghc3284_0.s * Deleting temp dirs: Deleting: /tmp/ghc3284_0 ghc: panic! (the 'impossible' happened)

(GHC version 6.10.1 for i386-unknown-linux):

initC: srt_lbl

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


Attachments (2)

RepMinimal.hs (3.3 KB) - added by ben.kavanagh 11 years ago.
Minimal example of failure. Failure seems to be related to compilation of 'badFunction'
RepSmall.hs (14.3 KB) - added by ben.kavanagh 11 years ago.
Cut down version of RepLib library core. This is to show where the problem code was used originally.

Download all attachments as: .zip

Change History (3)

Changed 11 years ago by ben.kavanagh

Attachment: RepMinimal.hs added

Minimal example of failure. Failure seems to be related to compilation of 'badFunction'

Changed 11 years ago by ben.kavanagh

Attachment: RepSmall.hs added

Cut down version of RepLib library core. This is to show where the problem code was used originally.

comment:1 Changed 11 years ago by simonpj

difficulty: Unknown
Resolution: duplicate
Status: newclosed

Thank you for boiling this down. It turns out to be a dup of #2799, reported a few days ago, which I fixed yesterday.

Simon

Note: See TracTickets for help on using tickets.