Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions regression/goto-instrument/unwind-assert1/test.desc
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
CORE
main.c
--unwind 10 --unwinding-assertions
^\[main.unwind.1\] line 5 unwinding assertion loop 0: SUCCESS$
^EXIT=0$
^SIGNAL=0$
^VERIFICATION SUCCESSFUL$
--
^warning: ignoring
^\[main.\d+\] line 5 assertion: SUCCESS$
7 changes: 6 additions & 1 deletion src/goto-instrument/unwind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,13 @@ void goto_unwindt::unwind(
unwind_strategy == unwind_strategyt::ASSERT_ASSUME ||
unwind_strategy == unwind_strategyt::ASSERT_PARTIAL)
{
const std::string loop_number = std::to_string(t->loop_number);
source_locationt source_location_annotated = loop_head->source_location();
source_location_annotated.set_property_class("unwind");
source_location_annotated.set_comment(
"unwinding assertion loop " + loop_number);
goto_programt::targett assertion = rest_program.add(
goto_programt::make_assertion(exit_cond, loop_head->source_location()));
goto_programt::make_assertion(exit_cond, source_location_annotated));
unwind_log.insert(assertion, loop_head->location_number);
}

Expand Down