From 8dc217f25a2890f3af4bf7260ea1005c575ac8fe Mon Sep 17 00:00:00 2001
From: Virgile Prevosto <virgile.prevosto@m4x.org>
Date: Fri, 25 Sep 2020 16:11:52 +0200
Subject: [PATCH] [aorai] temp variables of transition functions are not global

---
 src/plugins/aorai/aorai_utils.ml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/plugins/aorai/aorai_utils.ml b/src/plugins/aorai/aorai_utils.ml
index 4c43cd2143e..c4a7cda302f 100644
--- a/src/plugins/aorai/aorai_utils.ml
+++ b/src/plugins/aorai/aorai_utils.ml
@@ -1851,13 +1851,16 @@ let auto_func_block loc f st status res =
     if Aorai_option.Deterministic.get () then begin
       let orig = Data_for_aorai.get_varinfo curState in
       let copy = Cil.copyVarinfo orig (orig.vname ^ "_tmp") in
+      copy.vglob <- false;
       List.map (fun st -> (st, copy)) states, [copy]
     end else begin
       let bindings =
         List.map
           (fun st ->
              let state_var = Data_for_aorai.get_state_var st in
-             (st,Cil.copyVarinfo state_var (state_var.vname ^ "_tmp") ))
+             let copy = Cil.copyVarinfo state_var (state_var.vname ^ "_tmp") in
+             copy.vglob <- false;
+             (st,copy))
           states
       in bindings, snd (List.split bindings)
     end
-- 
GitLab