File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 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)
290290 for (auto it=gg.ifiter , itend=gg.gotoiter ; it!=itend; ++it)
291291 it->make_skip ();
292292 }
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 ();
293299}
294300
295301void goto_convertt::goto_convert (const codet &code, goto_programt &dest)
@@ -301,6 +307,9 @@ void goto_convertt::goto_convert_rec(
301307 const codet &code,
302308 goto_programt &dest)
303309{
310+ // Check that guarded_gotos was cleared after any previous use of this
311+ // converter instance:
312+ PRECONDITION (guarded_gotos.empty ());
304313 convert (code, dest);
305314
306315 finish_gotos (dest);
You can’t perform that action at this time.
0 commit comments