diff --git a/src/lustre/lustreNodeGen.ml b/src/lustre/lustreNodeGen.ml index 88b94efcd..6be5955d6 100644 --- a/src/lustre/lustreNodeGen.ml +++ b/src/lustre/lustreNodeGen.ml @@ -2373,6 +2373,8 @@ and compile_const_decl ?(ghost = false) cstate ctx map scope = function let vt, global_constraints = X.fold over_index cty (X.empty, cstate.global_constraints) in + let var_bounds = SVT.fold (fun k v a -> (k, v) :: a) !map.bounds [] in + List.iter (fun (k, v) -> SVT.add cstate.state_var_bounds k v) var_bounds; if ghost then cstate else ( { cstate with diff --git a/tests/regression/falsifiable/free_const_array.lus b/tests/regression/falsifiable/free_const_array.lus new file mode 100644 index 000000000..de7fafa51 --- /dev/null +++ b/tests/regression/falsifiable/free_const_array.lus @@ -0,0 +1,6 @@ +const Ids: int^2; + +node N() returns (ok: bool) +let + check Ids[0]=0; +tel \ No newline at end of file