@@ -168,7 +168,7 @@ void goto_convertt::convert_CPROVER_try_catch(
168
168
targets.set_throw (tmp.instructions .begin ());
169
169
170
170
// 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 ()));
172
172
catch_code.add_source_location ()=code.source_location ();
173
173
174
174
targets.destructor_stack .push_back (std::move (catch_code));
@@ -194,7 +194,7 @@ void goto_convertt::convert_CPROVER_throw(
194
194
dest.add_instruction (ASSIGN);
195
195
196
196
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 ());
198
198
}
199
199
200
200
// do we catch locally?
@@ -244,7 +244,7 @@ void goto_convertt::convert_CPROVER_try_finally(
244
244
convert (to_code (code.op1 ()), dest, mode);
245
245
}
246
246
247
- symbol_exprt goto_convertt::exception_flag ()
247
+ symbol_exprt goto_convertt::exception_flag (const irep_idt &mode )
248
248
{
249
249
irep_idt id=" $exception_flag" ;
250
250
@@ -260,6 +260,7 @@ symbol_exprt goto_convertt::exception_flag()
260
260
new_symbol.is_thread_local =true ;
261
261
new_symbol.is_file_local =false ;
262
262
new_symbol.type =bool_typet ();
263
+ new_symbol.mode = mode;
263
264
symbol_table.insert (std::move (new_symbol));
264
265
}
265
266
0 commit comments