Commit 5a7e6864 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Fix for print022 (round up when dividing type size by word size)

From Pepe Iborra (mnislaih)
parent d9dc5b44
......@@ -235,7 +235,7 @@ extractUnboxed tt clos = go tt (nonPtrs clos)
| otherwise = pprPanic "Expected a TcTyCon" (ppr t)
go [] _ = []
go (t:tt) xx
| (x, rest) <- splitAt (sizeofType t `div` wORD_SIZE) xx
| (x, rest) <- splitAt ((sizeofType t + wORD_SIZE - 1) `div` wORD_SIZE) xx
= x : go tt rest
sizeofTyCon = sizeofPrimRep . tyConPrimRep
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment