Opened 3 years ago

Closed 3 years ago

#5315 closed bug (fixed)

panic in idInfoToAmode with -O

Reported by: mikhail.vorozhtsov Owned by:
Priority: high Milestone: 7.2.1
Component: Compiler Version: 7.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Compile-time crash Difficulty:
Test Case: simplCore/should_run/T5315 Blocked By:
Blocking: Related Tickets:

Description

The attached program causes GHC panic:

$ ghc-7.3.20110710 -O -fforce-recomp HList.hs
[1 of 1] Compiling Main             ( HList.hs, HList.o )
ghc: panic! (the 'impossible' happened)
  (GHC version 7.3.20110710 for x86_64-unknown-linux):
	idInfoToAmode: void ww{v s1UG} [lid]

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

Not passing -O or commenting out hNth (Next p) l = ... makes the panic disappear.

Attachments (1)

HList.hs (2.3 KB) - added by mikhail.vorozhtsov 3 years ago.

Download all attachments as: .zip

Change History (6)

Changed 3 years ago by mikhail.vorozhtsov

comment:1 follow-up: Changed 3 years ago by simonmar

  • Milestone set to 7.2.1
  • Priority changed from normal to high

Is this a regression?

comment:2 in reply to: ↑ 1 Changed 3 years ago by mikhail.vorozhtsov

Replying to simonmar:

Is this a regression?

Probably no. If I remove the equality superclass "l ~ (HHead l :* HTail l)" from the HNonEmpty class declaration the panic goes away. Equality constraints in class contexts were implemented just recently.

comment:3 Changed 3 years ago by simonpj@…

commit ce8c84a76d0a19ff56d4c4e58744776fda2044bd
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Fri Jul 15 11:49:38 2011 +0100

    Use varToCoreExpr rather than Var (fixes #5315)
    
    A coercion variable in a term must be wrapped in a coercion!
    (Led to lint errors.)

comment:4 Changed 3 years ago by simonpj

  • Status changed from new to merge
  • Test Case set to simplCore/should_run/T5315

Thanks for the report. It's a real bug.

Pls merge to 7.2

comment:5 Changed 3 years ago by igloo

  • Resolution set to fixed
  • Status changed from merge to closed
Note: See TracTickets for help on using tickets.