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
22 changes: 22 additions & 0 deletions regression/cbmc/guard1/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
int main()
{
int i;
int j;
while(i) j = j + 1;
}

/*
#include <assert.h>

int main (void) {
int i;

while (1) {
i++;
}

assert(0);

return;
}
*/
7 changes: 7 additions & 0 deletions regression/cbmc/guard1/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CORE
main.c
--depth 19
^EXIT=0$
^SIGNAL=0$
^VERIFICATION SUCCESSFUL$
--
2 changes: 1 addition & 1 deletion src/util/guard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void guardt::add(const exprt &expr)

if(is_false() || expr.is_true())
return;
else if(is_true())
else if(is_true() || expr.is_false())
{
*this=expr;

Expand Down