Section CONSTRUCTORS.
Variables cunit prog: Clight.program.
Hypothesis LINK: linkorder cunit prog.
Variable ge: genv.
Hint Resolve make_intconst_correct make_floatconst_correct make_longconst_correct
make_singleconst_correct make_singleoffloat_correct make_floatofsingle_correct
make_floatofint_correct: cshm.
Hint Constructors eval_expr eval_exprlist: cshm.
Hint Extern 2 (@eq trace _ _) => traceEq: cshm.
Hint Resolve make_cast_int_correct make_longofint_correct: cshm.
Ltac InvEval :=
match goal with
| [ H: None = Some _ |- _ ] => discriminate
| [ H: Some _ = Some _ |- _ ] => inv H; InvEval
| [ H: match ?x with Some _ => _ | None => _ end = Some _ |- _ ] => destruct x eqn:?; InvEval
| [ H: match ?x with true => _ | false => _ end = Some _ |- _ ] => destruct x eqn:?; InvEval
| _ => idtac
end.

Lemma make_cast_correct:
forall e le m a b v ty1 ty2 v',
make_cast ty1 ty2 a = OK b ->
eval_expr ge e le m a v ->
sem_cast v ty1 ty2 m = Some v' ->
eval_expr ge e le m b v'.