From 084a6d88264747b8a51a0a4be9e79b288884b3d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Fri, 9 Oct 2020 09:52:32 +0200 Subject: [PATCH] [kernel] Cabs2cil: do not create const temporary variables. Removes the "const" attribute from types used to create temporary variables. --- src/kernel_internals/typing/cabs2cil.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/kernel_internals/typing/cabs2cil.ml b/src/kernel_internals/typing/cabs2cil.ml index 89290cbc881..d2117f9eaaf 100644 --- a/src/kernel_internals/typing/cabs2cil.ml +++ b/src/kernel_internals/typing/cabs2cil.ml @@ -1208,6 +1208,7 @@ let get_temp_name ghost () = (* Create a new temporary variable *) let newTempVar ~ghost loc descr (descrpure:bool) typ = let t' = (!typeForInsertedVar) typ in + let t' = Cil.typeRemoveAttributes ["const"] t' in let name = get_temp_name ghost () in let vi = makeVarinfo ~ghost ~temp:true ~loc false false name t' in vi.vdescr <- Some descr; -- GitLab