@@ -92,16 +92,17 @@ void stack_depth(
92
92
93
93
const exprt depth_expr (from_integer (depth, sym.type ()));
94
94
95
+ const irep_idt init_name=CPROVER_PREFIX " initialize" ;
96
+
95
97
Forall_goto_functions (f_it, goto_model.goto_functions )
96
98
if (f_it->second .body_available () &&
97
- f_it->first !=CPROVER_PREFIX " initialize " &&
98
- f_it->first !=goto_functionst::entry_point ())
99
+ f_it->first !=init_name &&
100
+ f_it->first !=goto_functionst::entry_point ())
99
101
stack_depth (f_it->second .body , sym, depth, depth_expr);
100
102
101
103
// initialize depth to 0
102
104
goto_functionst::function_mapt::iterator
103
- i_it=goto_model.goto_functions .function_map .find (
104
- CPROVER_PREFIX " initialize" );
105
+ i_it=goto_model.goto_functions .function_map .find (init_name);
105
106
DATA_INVARIANT (
106
107
i_it!=goto_model.goto_functions .function_map .end (),
107
108
" __CPROVER_initialize must exist" );
@@ -111,8 +112,8 @@ void stack_depth(
111
112
goto_programt::targett it=init.insert_before (first);
112
113
it->make_assignment ();
113
114
it->code =code_assignt (sym, from_integer (0 , sym.type ()));
114
- it-> source_location =first-> source_location ;
115
- it->function =first-> function ;
115
+ // no suitable value for source location -- omitted
116
+ it->function =init_name ;
116
117
117
118
// update counters etc.
118
119
goto_model.goto_functions .update ();
0 commit comments