Opened 16 months ago

Last modified 9 months ago

#15175 new bug

ghc: panic! (the 'impossible' happened)

Reported by: MADjestic Owned by:
Priority: normal Milestone: 8.10.1
Component: Compiler Version: 8.0.2
Keywords: Arrows Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Compile-time crash or panic Test Case:
Blocked By: Blocking:
Related Tickets: #5777, #13547 Differential Rev(s):
Wiki Page:

Description

Hey guys,

When following the installation instructions for SpaceInvaders, I am getting the following error:

[13 of 14] Compiling ObjectBehavior   ( src/ObjectBehavior.hs, dist/dist-sandbox-5c221c1a/build/spaceInvaders/spaceInvaders-tmp/ObjectBehavior.o )

src/ObjectBehavior.hs:20:1: warning: [-Wunused-imports]
    The qualified import of ‘System.Random’ is redundant
      except perhaps to import instances from ‘System.Random’
    To import instances alone, use: import System.Random()

src/ObjectBehavior.hs:23:1: warning: [-Wunused-imports]
    The import of ‘FRP.Yampa.Integration’ is redundant
      except perhaps to import instances from ‘FRP.Yampa.Integration’
    To import instances alone, use: import FRP.Yampa.Integration()

src/ObjectBehavior.hs:24:1: warning: [-Wunused-imports]
    The import of ‘FRP.Yampa.Utilities’ is redundant
      except perhaps to import instances from ‘FRP.Yampa.Utilities’
    To import instances alone, use: import FRP.Yampa.Utilities()

src/ObjectBehavior.hs:256:1: warning: [-Wmissing-signatures]
    Top-level binding with no type signature:
      gravity :: Vector2 Velocity

src/ObjectBehavior.hs:263:1: warning: [-Wmissing-signatures]
    Top-level binding with no type signature:
      limit :: Ord a => a -> a -> a -> a

src/ObjectBehavior.hs:265:1: warning: [-Wmissing-signatures]
    Top-level binding with no type signature:
      symLimit :: (Num t, Ord t) => t -> t -> t
ghc: panic! (the 'impossible' happened)
  (GHC version 8.0.2 for x86_64-unknown-linux):
	StgCmmEnv: variable not found
  $dNum_aoyU
  local binds for:
  $s$fVectorSpaceVector2a_$s$fVectorSpaceVector2a_$cnorm
  $s$fVectorSpaceVector2a_$s$fVectorSpaceVector2a_$cp1VectorSpace
  $sintegralAux_rsVn
  integralAux_rsVo
  lvl_rsVp
  lvl1_rsVq
  lvl2_rsVr
  lvl3_rsVs
  $sintegralAux1_rsVt
  integralAux1_rsVu
  $sintegralAux2_rsVv
  integralAux2_rsVw
  lvl4_rsVx
  lvl5_rsVy
  lvl6_rsVz
  lvl7_rsVA
  lvl8_rsVB
  lvl9_rsVC
  lvl10_rsVD
  lvl11_rsVE
  lvl13_rsVM
  lvl14_rsVN
  lvl15_rsVO
  lvl16_rsVP
  lvl17_rsVQ
  lvl18_rsVR
  lvl19_rsVS
  lvl20_rsVT
  lvl21_rsVU
  lvl22_rsVV
  lvl23_rsVW
  lvl24_rsVX
  lvl25_rsVY
  dt_rsVZ
  dt1_rsW0
  sf_rsW1
  dt2_rsW2
  lvl26_rsW3
  lvl27_rsW4
  lvl28_rsW5
  lvl29_rsW6
  lvl30_rsW7
  lvl31_rsW8
  lvl32_rsW9
  lvl33_rsWa
  lvl34_rsWb
  lvl35_rsWc
  lvl36_rsWd
  lvl37_rsWe
  lvl38_rsWf
  lvl39_rsWg
  lvl40_rsWh
  lvl41_rsWi
  lvl42_rsWj
  lvl43_rsWk
  lvl44_rsWl
  lvl45_rsWm
  lvl46_rsWn
  lvl47_rsWo
  lvl48_rsWp
  lvl49_rsWq
  lvl50_rsWr
  lvl51_rsWs
  lvl52_rsWt
  lvl53_rsWu
  lvl54_rsWv
  lvl55_rsWw
  lvl56_rsWx
  lvl57_rsWy
  lvl58_rsWz
  lvl59_rsWA
  lvl60_rsWB
  lvl61_rsWC
  lvl62_rsWD
  lvl63_rsWE
  lvl64_rsWF
  $sintegralAux3_rsWG
  integralAux5_rsWH
  ll_rsWI

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

/original issue

$ ghc -V
The Glorious Glasgow Haskell Compilation System, version 8.0.2
 $ uname -a
Linux nu 4.9.95-gentoo #1 SMP PREEMPT Wed May 9 22:32:30 CEST 2018 x86_64 Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz GenuineIntel GNU/Linux

Attachments (1)

ObjectBehavior.hs (1.3 KB) - added by sighingnow 16 months ago.
Minimal program that can trigger core lint error on ghc-head.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 16 months ago by simonpj

Can you (or someone) try with

  • -dcore-lint
  • GHC 8.4

We have fixed lots of bugs since 8.0!

Thanks

Changed 16 months ago by sighingnow

Attachment: ObjectBehavior.hs added

Minimal program that can trigger core lint error on ghc-head.

comment:2 Changed 16 months ago by sighingnow

The core lint error message:

λ inplace\bin\ghc-stage2.exe --make ObjectBehavior.hs -dcore-lint -fforce-recomp
[1 of 1] Compiling ObjectBehavior   ( ObjectBehavior.hs, ObjectBehavior.o )
*** Core Lint errors : in result of Desugar (before optimization) ***
<no location info>: warning:
    In the expression: $WPoint2
                         @ Double
                         $dRealFloat_a2Zv
                         (x_a1iF @ Double)
                         (+ @ Double
                            $dNum_a2Zy
                            y0_a1iC
                            (/ @ Double $dFractional_a2ZA (D# 0.0##) (D# 2.0##)))
    $dRealFloat_a2Zv :: RealFloat Double
    [LclId] is out of scope
<no location info>: warning:
    In the expression: + @ Double
                         $dNum_a2Zy
                         y0_a1iC
                         (/ @ Double $dFractional_a2ZA (D# 0.0##) (D# 2.0##))
    $dNum_a2Zy :: Num Double
    [LclId] is out of scope
*** Offending Program ***
Last edited 16 months ago by sighingnow (previous) (diff)

comment:3 Changed 16 months ago by RyanGlScott

Architecture: x86_64 (amd64)Unknown/Multiple
Keywords: Arrows added
Operating System: LinuxUnknown/Multiple

Thanks, sighingnow. My suspicion is that this is a duplicate of #5777 or #13547, since:

  1. This requires proc-notation
  2. This involves a GADT (Point2)

I'm not confident enough in this analysis to conclude it's an exact duplicate, but maybe someone more familiar with arrows than I can do so.

comment:4 Changed 15 months ago by bgamari

Milestone: 8.6.18.8.1

These won't be addressed for GHC 8.6.

comment:5 Changed 9 months ago by osa1

Milestone: 8.8.18.10.1

Bumping milestones of low-priority tickets.

Note: See TracTickets for help on using tickets.