Skip to content

Commit 5f1b020

Browse files
committed
Congruence bug in subtraction: Fix testcase such that it still catches bug, but goes through when it is fixed.
1 parent 74f3649 commit 5f1b020

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
11
// PARAM: --enable ana.int.congruence --enable ana.int.interval
22
// reduced (via creduce and manually) from sv-benchmarks/c/hardness-nfm22/hardness_codestructure_dependencies_file-70.c
33

4+
#include <goblint.h>
5+
46
main() {
57
int a;
68
unsigned c = 1;
79
if (a)
810
c = 4;
9-
if (c + (c + 2)) // NOWARN
11+
12+
// The following condition evaluated to "both branches dead", due to a bug in the congruence domain.
13+
// --- Even though the condition is true the concrete.
14+
if (c + (c + 2))
1015
a = 1;
16+
17+
// Check that this is reachable.
18+
// That is, check that not both branches of previous condition are dead.
19+
__goblint_check(1);
20+
return 0;
1121
}

0 commit comments

Comments
 (0)