Commit 704e867c by Zachary Snow

packed array conversion packs any unsupported unpacked dimensions

parent e80f880f
......@@ -41,14 +41,16 @@ convertDescription =
-- collects and converts multi-dimensional packed-array declarations
traverseDeclM :: Decl -> State Info Decl
traverseDeclM (Variable Local t ident a me) = do
t' <- traverseDeclM' t ident
return $ Variable Local t' ident a me
traverseDeclM (Variable dir t ident a me) = do
let (tf, rs) = typeRanges t
if dir /= Local || (rs /= [] && a /= [])
then do
let t' = tf $ a ++ rs
t'' <- traverseDeclM' t' ident
return $ Variable dir t'' ident [] me
else do
t' <- traverseDeclM' t ident
return $ Variable dir t' ident a me
traverseDeclM (Parameter t ident e) = do
t' <- traverseDeclM' t ident
return $ Parameter t' ident e
......
Markdown is supported
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