Skip to content
Snippets Groups Projects
Commit 87f3dca1 authored by Andre Maroneze's avatar Andre Maroneze
Browse files

Merge branch 'fix/eva/infinite-constant' into 'master'

[Eva] Fixes a crash on INFINITY with option -eva-all-rounding-modes-constants.

See merge request frama-c/frama-c!3178
parents 6ad93d4f 49e355e8
No related branches found
No related tags found
No related merge requests found
......@@ -528,9 +528,10 @@ let eval_float_constant f fkind fstring =
if Fc_float.is_nan f
then V.inject_float Fval.nan
else
let all_rounding = Value_parameters.AllRoundingModesConstants.get in
let fl, fu = match fstring with
| Some string when fkind = Cil_types.FLongDouble ||
Value_parameters.AllRoundingModesConstants.get () ->
| Some "INFINITY" -> f, f (* Special case for the INFINITY macro. *)
| Some string when fkind = Cil_types.FLongDouble || all_rounding () ->
let open Floating_point in
let {f_lower; f_upper} = snd (parse string) in
(* Computations are done in double. For long double constants, if we
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment