Module VSF := FSetFacts.Facts(VSet).Module VSP := FSetProperties.Properties(VSet).Definition match_prog (p tp: program) : Prop :=
    match_program (fun ctx f tf => transf_fundef f = OK tf) eq p tp
 /\ prog_types tp = prog_types p.

Lemma val_casted_load_result: forall v ty chunk, val_casted v ty -> access_mode ty = By_value chunk -> Val.load_result chunk v = v.