From 3566c6206fa3fa78d1e03c0bfec736be2f8ea9f4 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Tue, 31 Mar 2009 16:08:24 +0000 Subject: [PATCH] Fixed retyping non-packed records into arrays --- backends/BackendPasses.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backends/BackendPasses.hs b/backends/BackendPasses.hs index a45683d..2b93572 100644 --- a/backends/BackendPasses.hs +++ b/backends/BackendPasses.hs @@ -287,6 +287,9 @@ declareSizesArray = occamOnlyPass "Declare array-size arrays" -- element of its _sizes array. A.UnknownDimension -> A.ExprVariable m $ specificDimSize i v | (d, i) <- zip ds [0..]] + -- Must be an unpacked record if it's not BIJust: + (_, A.Record {}) -> + return $ A.BytesInType m tSrc _ -> dieP m "Cannot compute size of source type" -- Build the _sizes array for the destination.