Ticket #2820 (closed bug: duplicate)

Opened 5 years ago

Last modified 5 years ago

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: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

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 RepCombined?3.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

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

Change History

Changed 5 years ago by ben.kavanagh

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

Changed 5 years ago by ben.kavanagh

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

Changed 5 years ago by simonpj

  • status changed from new to closed
  • difficulty set to Unknown
  • resolution set to duplicate

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.