File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -290,6 +290,12 @@ void goto_convertt::finish_guarded_gotos(goto_programt &dest)
290
290
for (auto it=gg.ifiter , itend=gg.gotoiter ; it!=itend; ++it)
291
291
it->make_skip ();
292
292
}
293
+
294
+ // Must clear this, as future functions may be converted
295
+ // using the same instance of goto_convertt, typically via
296
+ // goto_convert_functions.
297
+
298
+ guarded_gotos.clear ();
293
299
}
294
300
295
301
void goto_convertt::goto_convert (const codet &code, goto_programt &dest)
@@ -301,6 +307,9 @@ void goto_convertt::goto_convert_rec(
301
307
const codet &code,
302
308
goto_programt &dest)
303
309
{
310
+ // Check that guarded_gotos was cleared after any previous use of this
311
+ // converter instance:
312
+ PRECONDITION (guarded_gotos.empty ());
304
313
convert (code, dest);
305
314
306
315
finish_gotos (dest);
You can’t perform that action at this time.
0 commit comments