C++: Port a test from the experimental directory to show that it works in the non-experimental "new" range analysis.

This commit is contained in:
Mathias Vorreiter Pedersen
2025-10-01 11:33:47 +01:00
parent ca53a8e787
commit 353ee8baa0

View File

@@ -145,4 +145,15 @@ void nonterminating_without_operands_as_ssa(X *x) {
while (x->n) {
x->n--;
}
}
void test_with_irreduble_cfg(int i, int x) {
if (x < i) {
} else {
goto inLoop;
}
for(; i < x; i++) {
inLoop:
range(i); // $ range="<=InitializeParameter: x+0"
}
}