Эх сурвалжийг харах

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

Taddeus Kroes 12 жил өмнө
parent
commit
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)