File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -211,26 +211,25 @@ void goto_symext::symex_goto(statet &state)
211
211
framet::goto_state_listt &goto_state_list =
212
212
state.call_stack ().top ().goto_state_map [new_state_pc];
213
213
214
- // If the guard is true (and the alternative branch unreachable) we can move
215
- // the state in this case as it'll never be accessed on the alternate branch.
214
+ // On an unconditional GOTO we don't need our state, as it will be overwritten
215
+ // by merge_goto. Therefore we move it onto goto_state_list instead of copying
216
+ // as usual.
216
217
if (new_guard.is_true ())
217
218
{
219
+ // The move here only moves goto_statet, the base class of goto_symex_statet
220
+ // and not the entire thing.
218
221
goto_state_list.emplace_back (state.source , std::move (state));
219
- }
220
- else
221
- {
222
- goto_state_list.emplace_back (state.source , state);
223
- }
224
222
225
- symex_transition (state, state_pc, backward);
223
+ symex_transition (state, state_pc, backward);
226
224
227
- // adjust guards
228
- if (new_guard.is_true ())
229
- {
230
225
state.guard = guardt (false_exprt (), guard_manager);
231
226
}
232
227
else
233
228
{
229
+ goto_state_list.emplace_back (state.source , state);
230
+
231
+ symex_transition (state, state_pc, backward);
232
+
234
233
// produce new guard symbol
235
234
exprt guard_expr;
236
235
You can’t perform that action at this time.
0 commit comments