Skip to content

Commit 353ee8b

Browse files
committed
C++: Port a test from the experimental directory to show that it works in the non-experimental "new" range analysis.
1 parent ca53a8e commit 353ee8b

File tree

1 file changed

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

1 file changed

+11
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,4 +145,15 @@ void nonterminating_without_operands_as_ssa(X *x) {
145145
while (x->n) {
146146
x->n--;
147147
}
148+
}
149+
150+
void test_with_irreduble_cfg(int i, int x) {
151+
if (x < i) {
152+
} else {
153+
goto inLoop;
154+
}
155+
for(; i < x; i++) {
156+
inLoop:
157+
range(i); // $ range="<=InitializeParameter: x+0"
158+
}
148159
}

0 commit comments

Comments
 (0)