Realised that mobile arrays should be allocated after all, unless they are missing a dimension

This commit is contained in:
Neil Brown 2009-03-23 21:13:13 +00:00
parent 3739ff7cbd
commit 585a5ed477

View File

@ -1282,7 +1282,7 @@ cdeclareInit m t@(A.Mobile t') var
= Just $ do call genVariableUnchecked var A.Original
tell ["=NULL;"]
case t' of
A.Array {} -> return ()
A.Array ds _ | A.UnknownDimension `elem` ds -> return ()
_ -> call genAssign m [var] $ A.ExpressionList m [A.AllocMobile m t Nothing]
cdeclareInit _ _ _ = Nothing