(* (* originaly, premises are nested_non_volatile, sizeof < modulus, sizeof = sz *)
Hint Extern 1 (data_at_ _ _ _ |-- memory_block _ _ _) =>
(simple apply data_at__memory_block_cancel;
[reflexivity
| rewrite ?sizeof_Tarray by omega;
rewrite ?sizeof_tuchar, ?Z.mul_1_l;simpl;
rep_omega
| try apply f_equal_Int_repr;
rewrite ?sizeof_Tarray by omega;
rewrite ?sizeof_tuchar, ?Z.mul_1_l; simpl; rep_omega
])
: cancel.
Hint Extern 1 (data_at _ _ _ _ |-- memory_block _ _ _) =>
(simple apply data_at_memory_block;
[reflexivity
| rewrite ?sizeof_Tarray by omega;
rewrite ?sizeof_tuchar, ?Z.mul_1_l;simpl;
rep_omega
| try apply f_equal_Int_repr;
rewrite ?sizeof_Tarray by omega;
rewrite ?sizeof_tuchar, ?Z.mul_1_l; simpl; rep_omega
])
: cancel.
*)

Lemma withspacer_field_at__Tunion: forall sh t gfs i id a p,
nested_field_type t gfs = Tunion id a ->
in_members i (co_members (get_co id)) ->
withspacer sh
(nested_field_offset t gfs +
sizeof (field_type i (co_members (get_co id))))
(nested_field_offset t gfs + sizeof (nested_field_type t gfs))
(field_at_ sh t (gfs UDOT i)) p =
memory_block sh (sizeof (nested_field_type t gfs)) (field_address t gfs p).