Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/bap_types/bap_helpers.ml
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ module Type = struct
| Type.Imm _,_,_ -> Type_error.expect_mem ()
| Type.Mem (s,_) as t, Type.Imm s', Type.Imm u ->
let s = Size.in_bits s in
if s < s'
if s <> s'
then Type_error.expect (Type.Imm s) ~got:(Type.Imm s')
else if is_error (Size.of_int u)
then Type_error.wrong_cast ()
Expand Down Expand Up @@ -680,6 +680,7 @@ module Normalize = struct
| Var v -> Var.typ v
| Store (m,_,_,_,_) -> infer m
| Ite (_,x,y) -> both x y
| Unknown (_,t) -> t
| _ -> invalid_arg "type error"
and both x y =
match infer x, infer y with
Expand Down