Opened 9 years ago

Closed 9 years ago

#5286 closed bug (fixed)

panic: getPredTyDescription EqPred [7.0 regression]

Reported by: simonmar Owned by: simonpj
Priority: highest Milestone: 7.2.1
Component: Compiler Version: 7.0.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Compile-time crash Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

Lots of tests are panicing with "getPredTyDescription EqPred". They all seem to be failing the profasm way only. Here's a few:

=====> InstEqContext(profasm) 68 of 130 [0, 0, 0]
cd . && '/64playpen/simonmar/nightly/HEAD-cam-04-unx/x86_64-unknown-linux/inplace/bin/ghc-stage2' -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-conf -rtsopts  -c InstEqContext.hs -O -prof -auto-all -fasm   >InstEqContext.comp.stderr 2>&1
Compile failed (status 256) errors were:
ghc-stage2: panic! (the 'impossible' happened)
  (GHC version 7.1.20110627 for x86_64-unknown-linux):
        getPredTyDescription EqPred

=====> InstEqContext3(profasm) 1796 of 2819 [1, 9, 0]
cd ./indexed-types/should_compile && '/64playpen/simonmar/nightly/HEAD-cam-04-unx/x86_64-unknown-linux/inplace/bin/ghc-stage2' -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-conf -rtsopts  -c InstEqContext3.hs -O -prof -auto-all -fasm   >InstEqContext3.comp.stderr 2>&1
Compile failed (status 256) errors were:
ghc-stage2: panic! (the 'impossible' happened)
  (GHC version 7.1.20110627 for x86_64-unknown-linux):
	getPredTyDescription EqPred

=====> T2238(profasm) 1804 of 2819 [1, 10, 0]
cd ./indexed-types/should_compile && '/64playpen/simonmar/nightly/HEAD-cam-04-unx/x86_64-unknown-linux/inplace/bin/ghc-stage2' -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-conf -rtsopts  -c T2238.hs -O -prof -auto-all -fasm   >T2238.comp.stderr 2>&1
Compile failed (status 256) errors were:
ghc-stage2: panic! (the 'impossible' happened)
  (GHC version 7.1.20110627 for x86_64-unknown-linux):
	getPredTyDescription EqPred

=====> T4338(profasm) 1850 of 2819 [1, 11, 0]
cd ./indexed-types/should_compile && '/64playpen/simonmar/nightly/HEAD-cam-04-unx/x86_64-unknown-linux/inplace/bin/ghc-stage2' -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-conf -rtsopts  -c T4338.hs -O -prof -auto-all -fasm   >T4338.comp.stderr 2>&1
Compile failed (status 256) errors were:
ghc-stage2: panic! (the 'impossible' happened)
  (GHC version 7.1.20110627 for x86_64-unknown-linux):
	getPredTyDescription EqPred

=====> T2102(profasm) 1852 of 2819 [1, 12, 0]
cd ./indexed-types/should_compile && '/64playpen/simonmar/nightly/HEAD-cam-04-unx/x86_64-unknown-linux/inplace/bin/ghc-stage2' -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-conf -rtsopts  -c T2102.hs -O -prof -auto-all -fasm   >T2102.comp.stderr 2>&1
Compile failed (status 256) errors were:
ghc-stage2: panic! (the 'impossible' happened)
  (GHC version 7.1.20110627 for x86_64-unknown-linux):
	getPredTyDescription EqPred

Change History (2)

comment:1 Changed 9 years ago by simonpj

Owner: set to simonpj

comment:2 Changed 9 years ago by simonpj

Resolution: fixed
Status: newclosed

Fixed by

commit 83cacd522a78cd7a19359b3df3e160cb44e2ca3f
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Thu Jun 30 17:45:00 2011 +0100

    Fix Trac #5286: getPredTyDescription

>---------------------------------------------------------------

 compiler/codeGen/ClosureInfo.lhs  |    2 +-
 compiler/codeGen/StgCmmClosure.hs |    7 +++----
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/compiler/codeGen/ClosureInfo.lhs b/compiler/codeGen/ClosureInfo.lhs
index d2c63b3..4f59d95 100644
--- a/compiler/codeGen/ClosureInfo.lhs
+++ b/compiler/codeGen/ClosureInfo.lhs
@@ -1052,5 +1052,5 @@ getTyDescription ty  getPredTyDescription :: PredType -> String  getPredTyDescription (ClassP cl _) = getOccString cl  getPredTyDescription (IParam ip _) = getOccString (ipNameName ip) -getPredTyDescription (EqPred _ _) = panic "getPredTyDescription EqPred"
+getPredTyDescription (EqPred _ _)  = "Type equality"
 \end{code}
diff --git a/compiler/codeGen/StgCmmClosure.hs b/compiler/codeGen/StgCmmClosure.hs
index d617743..a8d91f5 100644
--- a/compiler/codeGen/StgCmmClosure.hs
+++ b/compiler/codeGen/StgCmmClosure.hs
@@ -1086,10 +1086,9 @@ getTyDescription ty
     fun_result other	     = getTyDescription other
 
 getPredTyDescription :: PredType -> String
-getPredTyDescription (ClassP cl _)     = getOccString cl
-getPredTyDescription (IParam ip _)     = getOccString (ipNameName ip)
-getPredTyDescription (EqPred ty1 _ty2) = getTyDescription ty1	-- Urk?
-
+getPredTyDescription (ClassP cl _) = getOccString cl 
+getPredTyDescription (IParam ip _) = getOccString (ipNameName ip)
+getPredTyDescription (EqPred {})   = "Type equality"
Note: See TracTickets for help on using tickets.