let offset_of_field f =
    let rec acc sz l f =
      match l with
        | [] -> Wp_parameters.fatal "[offset_of_field] not found %s" f.fname
        | fi::m ->
            if Cil_datatype.Fieldinfo.equal f fi
            then sz
            else  acc (F.i_add sz  (sizeof (Ctypes.object_of fi.ftype))) m f
    in
    acc F.i_zero f.fcomp.cfields f