Skip to content

Fix constant propagator merge operator #1057

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
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
18 changes: 18 additions & 0 deletions regression/goto-instrument/constant-propagation1/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include <assert.h>

void main()
{
unsigned char n;
__CPROVER_assume(n > 0); // To keep division well defined
__CPROVER_assume(n * n > 0); // To keep division well defined

unsigned char i = 0;
unsigned char j = 0;

unsigned char aux1 = i / (n * n);
for (i = 0; i < n; ++i, aux1 = i / (n * n)) {
for (j = 0; j < n; ++j) {
}
}
assert(i != n);
}
8 changes: 8 additions & 0 deletions regression/goto-instrument/constant-propagation1/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CORE
main.c
--constant-propagator --unwind 3
^EXIT=10$
^SIGNAL=0$
^VERIFICATION FAILED$
--
^warning: ignoring
Loading