فهرست منبع

Fixed bug where array types on global vars would not be printed properly in assembly

Taddeus Kroes 12 سال پیش
والد
کامیت
49585e8d11
1فایلهای تغییر یافته به همراه6 افزوده شده و 0 حذف شده
  1. 6 0
      phases/dimreduce.ml

+ 6 - 0
phases/dimreduce.ml

@@ -75,6 +75,12 @@ and dim_reduce depth = function
     Allocate (dec, [multiply dims], ann)
 
   (* Simplify array types in declarations *)
+  | GlobalDef (export, ArrayDims (ctype, _), name, None, ann) ->
+    GlobalDef (export, Array ctype, name, None, ann)
+
+  | GlobalDef (export, ArrayDims (ctype, _), name, None, ann) ->
+    GlobalDef (export, Array ctype, name, None, ann)
+
   | VarDec (ArrayDims (ctype, _), name, None, ann) ->
     VarDec (Array ctype, name, None, ann)