Skip to content

Commit 2787f0a

Browse files
authored
Merge pull request github#14708 from MathiasVP/add-testcase-for-range-analysis
C++: Add range analysis testcase
2 parents a04830b + 9dca669 commit 2787f0a

File tree

1 file changed

+10
-0
lines changed
  • cpp/ql/test/library-tests/ir/range-analysis

1 file changed

+10
-0
lines changed

cpp/ql/test/library-tests/ir/range-analysis/test.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,13 @@ void test_div(int x) {
130130
range(x >> 2); // $ range=>=0 range=<=2
131131
}
132132
}
133+
134+
struct X { int n; };
135+
void read_argument(const X *);
136+
137+
void nonterminating_without_operands_as_ssa(X *x) {
138+
read_argument(x);
139+
while (x->n) {
140+
x->n--;
141+
}
142+
}

0 commit comments

Comments
 (0)