diff --git a/src/frontc/cabs2cil.ml b/src/frontc/cabs2cil.ml index 023a3eb5b..2f847eb04 100644 --- a/src/frontc/cabs2cil.ml +++ b/src/frontc/cabs2cil.ml @@ -5239,7 +5239,7 @@ and doCondExp (asconst: bool) (* Try to evaluate the conditional expression | _ -> let (se, e, t) = doExp asconst e (AExp None) in ignore (checkBool t e); - CEExp (se, if !lowerConstants then constFold asconst e else e) + CEExp (se, if !lowerConstants || asconst then constFold asconst e else e) and compileCondExp (asconst:bool) (ce: condExpRes) (st: chunk) (sf: chunk) : chunk = match ce with