let eval_term_as_exact_loc env result t =
  match t.term_node with
    | TLval _ ->
        (match eval_tlval env result t with
           | [] | _ :: _ :: _ -> raise Not_an_exact_loc
           | [typ, loc] ->
               let loc = Locations.make_loc loc (Bit_utils.sizeof typ) in
               if not (valid_cardinal_zero_or_one ~for_writing:false loc)
               then raise Not_an_exact_loc;
               typ, loc
        )
    | _ -> raise Not_an_exact_loc