Skip to content

Commit 62d0223

Browse files
author
Daniel Kroening
authored
Merge pull request #370 from peterschrammel/skip-unreachable-instructions
Skip unreachable instructions
2 parents 8161f10 + 7431039 commit 62d0223

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/goto-symex/symex_goto.cpp

+11
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,17 @@ void goto_symext::symex_goto(statet &state)
102102
new_state_pc=goto_target;
103103
state_pc=state.source.pc;
104104
state_pc++;
105+
106+
// skip dead instructions
107+
if(new_guard.is_true())
108+
while(state_pc!=goto_target && !state_pc->is_target())
109+
++state_pc;
110+
111+
if(state_pc==goto_target)
112+
{
113+
state.source.pc=goto_target;
114+
return; // nothing else to do
115+
}
105116
}
106117
else
107118
{

0 commit comments

Comments
 (0)