@@ -211,11 +211,13 @@ 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
- // On an unconditional GOTO we don't need our state any more , as it will be
215
- // overwritten by merge_goto. Therefore we move it onto goto_state_list
216
- // instead of copying as usual.
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.
217
217
if (new_guard.is_true ())
218
218
{
219
+ // The move here only moves goto_statet, the base class of goto_symex_statet
220
+ // and not the entire thing.
219
221
goto_state_list.emplace_back (state.source , std::move (state));
220
222
221
223
symex_transition (state, state_pc, backward);
@@ -330,7 +332,7 @@ void goto_symext::merge_goto(
330
332
{
331
333
if (state.guard .is_false ())
332
334
{
333
- state. move_from ( std::move (goto_state) );
335
+ static_cast <goto_statet&>(state) = std::move (goto_state);
334
336
}
335
337
else
336
338
{
@@ -339,14 +341,14 @@ void goto_symext::merge_goto(
339
341
340
342
// merge value sets
341
343
state.value_set .make_union (goto_state.value_set );
342
- }
343
- }
344
344
345
- // adjust guard
346
- state.guard |=goto_state.guard ;
345
+ // adjust guard
346
+ state.guard |=goto_state.guard ;
347
347
348
- // adjust depth
349
- state.depth =std::min (state.depth , goto_state.depth );
348
+ // adjust depth
349
+ state.depth =std::min (state.depth , goto_state.depth );
350
+ }
351
+ }
350
352
}
351
353
352
354
// / Applies f to `(k, ssa, i, j)` if the first map maps k to (ssa, i) and
0 commit comments