Section COMPOSITE_ENV.
Context {cs: compspecs}.
Ltac solve_field_offset_type i m :=
let H := fresh "H" in
let Hty := fresh "H" in
let Hofs := fresh "H" in
let t := fresh "t" in
let ofs := fresh "ofs" in
pose proof field_offset_field_type_match cenv_cs i m;
destruct (Ctypes.field_offset cenv_cs i m) as [ofs|?] eqn:Hofs, (Ctypes.field_type i m) as [t|?] eqn:Hty;
[clear H | inversion H | inversion H | clear H].
(* field_offset2_in_range union's version *)

(* if sizeof Tvoid = 0, this lemma can be nicer. *)
Lemma field_offset_no_overlap:
forall i1 i2 m,
i1 <> i2 ->
in_members i1 m ->
in_members i2 m ->
field_offset cenv_cs i1 m + sizeof (field_type i1 m) <= field_offset cenv_cs i2 m \/
field_offset cenv_cs i2 m + sizeof (field_type i2 m) <= field_offset cenv_cs i1 m.