From 9ea45963ad2ef2051ca3689562607eb4916d65e8 Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <slyfox@gentoo.org>
Date: Sat, 2 Jun 2018 21:08:06 +0000
Subject: [PATCH] C codegen: print details of pprStatics panics

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
---
 compiler/cmm/PprC.hs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs
index f3f9d3c0b3..e8f71449ab 100644
--- a/compiler/cmm/PprC.hs
+++ b/compiler/cmm/PprC.hs
@@ -540,11 +540,11 @@ pprStatics dflags (CmmStaticLit (CmmInt i W64) : rest)
         q = i `shiftR` 32
 pprStatics dflags (CmmStaticLit (CmmInt _ w) : _)
   | w /= wordWidth dflags
-  = panic "pprStatics: cannot emit a non-word-sized static literal"
+  = pprPanic "pprStatics: cannot emit a non-word-sized static literal" (ppr w)
 pprStatics dflags (CmmStaticLit lit : rest)
   = pprLit1 lit : pprStatics dflags rest
 pprStatics _ (other : _)
-  = pprPanic "pprWord" (pprStatic other)
+  = pprPanic "pprStatics: other" (pprStatic other)
 
 pprStatic :: CmmStatic -> SDoc
 pprStatic s = case s of
-- 
GitLab