Skip to content

Commit

Permalink
CN: bugfix: conversion of bools in cLogicalFuns
Browse files Browse the repository at this point in the history
  • Loading branch information
talsewell committed Aug 31, 2023
1 parent 3d97c28 commit 0c7bcf5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backend/cn/cLogicalFuns.ml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,11 @@ let rec symb_exec_mu_pexpr var_map pexpr =
| None -> fail {loc; msg = Generic (Pp.item "expr from C syntax: non-constant type"
(IT.pp ct_it))}
in
do_wrapI loc ct x
begin match ct with
| Sctypes.Integer Sctypes.IntegerTypes.Bool ->
return (IT.ite_ (IT.eq_ (x, IT.int_ 0), IT.int_ 0, IT.int_ 1))
| _ -> do_wrapI loc ct x
end
| M_PEwrapI (act, pe) ->
let@ x = symb_exec_mu_pexpr var_map pe in
do_wrapI loc act.ct x
Expand Down

0 comments on commit 0c7bcf5

Please sign in to comment.