@@ -168,7 +168,7 @@ void goto_convertt::convert_CPROVER_try_catch(
168168 targets.set_throw (tmp.instructions .begin ());
169169
170170 // now put 'catch' code onto destructor stack
171- code_ifthenelset catch_code (exception_flag (), to_code (code.op1 ()));
171+ code_ifthenelset catch_code (exception_flag (mode ), to_code (code.op1 ()));
172172 catch_code.add_source_location ()=code.source_location ();
173173
174174 targets.destructor_stack .push_back (std::move (catch_code));
@@ -194,7 +194,7 @@ void goto_convertt::convert_CPROVER_throw(
194194 dest.add_instruction (ASSIGN);
195195
196196 t_set_exception->source_location =code.source_location ();
197- t_set_exception->code = code_assignt (exception_flag (), true_exprt ());
197+ t_set_exception->code = code_assignt (exception_flag (mode ), true_exprt ());
198198 }
199199
200200 // do we catch locally?
@@ -244,7 +244,7 @@ void goto_convertt::convert_CPROVER_try_finally(
244244 convert (to_code (code.op1 ()), dest, mode);
245245}
246246
247- symbol_exprt goto_convertt::exception_flag ()
247+ symbol_exprt goto_convertt::exception_flag (const irep_idt &mode )
248248{
249249 irep_idt id=" $exception_flag" ;
250250
@@ -260,6 +260,7 @@ symbol_exprt goto_convertt::exception_flag()
260260 new_symbol.is_thread_local =true ;
261261 new_symbol.is_file_local =false ;
262262 new_symbol.type =bool_typet ();
263+ new_symbol.mode = mode;
263264 symbol_table.insert (std::move (new_symbol));
264265 }
265266
0 commit comments