Skip to content

Commit 1d76fea

Browse files
Daniel Kroeningtautschnig
authored andcommitted
bugfix: replace_return skips instructions after a return
This affects programs that have two return instructions in sequence. The second was skipped.
1 parent ece7ea7 commit 1d76fea

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/goto-programs/goto_inline_class.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,11 @@ void goto_inlinet::replace_return(
165165
lhs,
166166
typecast_exprt::conditional_cast(it->return_value(), lhs.type()));
167167
it->type=ASSIGN;
168-
169-
it++;
170168
}
171169
else
172170
{
173171
it->code_nonconst() = code_expressiont(it->return_value());
174172
it->type=OTHER;
175-
it++;
176173
}
177174
}
178175
}

0 commit comments

Comments
 (0)