add a safety net to avoid generating bogus code
authorSimon Marlow <simonmar@microsoft.com>
Wed, 4 Apr 2007 15:50:01 +0000 (15:50 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Wed, 4 Apr 2007 15:50:01 +0000 (15:50 +0000)
compiler/cmm/PprC.hs

index d1536bf..fa92911 100644 (file)
@@ -433,6 +433,9 @@ pprStatics (CmmStaticLit (CmmInt i I64) : rest)
 #endif
   where r = i .&. 0xffffffff
        q = i `shiftR` 32
+pprStatics (CmmStaticLit (CmmInt i rep) : rest)
+  | machRepByteWidth rep /= wORD_SIZE
+  = panic "pprStatics: cannot emit a non-word-sized static literal"
 pprStatics (CmmStaticLit lit : rest)
   = pprLit1 lit : pprStatics rest
 pprStatics (other : rest)