summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cfrontend/Cexec.v2
-rw-r--r--cfrontend/SimplExpr.v4
2 files changed, 3 insertions, 3 deletions
diff --git a/cfrontend/Cexec.v b/cfrontend/Cexec.v
index bc85efd..b41902c 100644
--- a/cfrontend/Cexec.v
+++ b/cfrontend/Cexec.v
@@ -863,7 +863,7 @@ Fixpoint step_expr (k: kind) (a: expr) (m: mem): reducts expr :=
let op := match id with Incr => Oadd | Decr => Osub end in
let r' :=
Ecomma (Eassign (Eloc b ofs ty)
- (Ebinop op (Eval v1 ty) (Eval (Vint Int.one) type_int32s) (typeconv ty))
+ (Ebinop op (Eval v1 ty) (Eval (Vint Int.one) type_int32s) (incrdecr_type ty))
ty)
(Eval v1 ty) ty in
topred (Rred r' m t)
diff --git a/cfrontend/SimplExpr.v b/cfrontend/SimplExpr.v
index 01f304e..f9aa8db 100644
--- a/cfrontend/SimplExpr.v
+++ b/cfrontend/SimplExpr.v
@@ -139,8 +139,8 @@ Function makeif (a: expr) (s1 s2: statement) : statement :=
Definition transl_incrdecr (id: incr_or_decr) (a: expr) (ty: type) : expr :=
match id with
- | Incr => Ebinop Oadd a (Econst_int Int.one type_int32s) (typeconv ty)
- | Decr => Ebinop Osub a (Econst_int Int.one type_int32s) (typeconv ty)
+ | Incr => Ebinop Oadd a (Econst_int Int.one type_int32s) (incrdecr_type ty)
+ | Decr => Ebinop Osub a (Econst_int Int.one type_int32s) (incrdecr_type ty)
end.
(** Generate a [Sset] or [Sbuiltin] operation as appropriate