let mkTRefArray (elemty,size,attr) =
(* Check the array size is of a correct form *)
ignore (lenOfArray64 (Some size));
let siz = expToAttrParam size in
let attr = addAttribute (Attr(arraylen_attr_name,[siz])) attr in
(* Make the underlying type an array so that indexing it is still valid C. *)
TPtr(TArray(elemty,Some size,empty_size_cache (),[]),attr)