Definition inttype2init_data (sz: intsize) : (int -> init_data) :=
match sz with
| IBool  =>  Init_int8
| I8  =>  Init_int8
| I16 =>  Init_int16
| I32 =>  Init_int32
end.
Definition notboolsize (sz: intsize) : Prop :=
match sz with IBool => False | _ => True end.

Lemma process_globvar_array:
forall {cs: compspecs} {Espec: OracleKind} Delta gz P Q R (i: ident)
gv gvs SF c Post (n: Z) (t: type)  (sz : intsize) (sign : signedness) (data : list int),
(var_types Delta) ! i = None ->
(glob_types Delta) ! i = Some (gvar_info gv) ->
gvar_info gv = tarray t n ->
gvar_volatile gv = false ->
globvar_all_aligned gv = true ->
t = Tint sz sign noattr ->
notboolsize sz ->
n = Zlength (gvar_init gv) ->
gvar_init gv = map (inttype2init_data sz) data ->
init_data_list_size (gvar_init gv) <= sizeof (gvar_info gv) <=
Ptrofs.max_unsigned ->
semax Delta (PROPx P (LOCALx (gvars gz :: Q)
(SEPx ((data_at
(readonly2share (gvar_readonly gv))
(tarray (Tint sz sign noattr) n)
(map (Vint oo Cop.cast_int_int sz sign) data) (gz i))
:: R)))
* globvars2pred gz gvs * SF)
c Post ->
semax Delta (PROPx P (LOCALx (gvars gz :: Q) (SEPx R))
* globvars2pred gz ((i,gv)::gvs) * SF)
c Post.