C++: Add a testcase that fails to terminate in modulus analysis when we don't have IR operands as SSA variables.

This commit is contained in:
Mathias Vorreiter Pedersen
2023-11-07 11:52:35 +00:00
parent a0e73eaab0
commit 9dca6697fb

View File

@@ -130,3 +130,13 @@ void test_div(int x) {
range(x >> 2); // $ range=>=0 range=<=2
}
}
struct X { int n; };
void read_argument(const X *);
void nonterminating_without_operands_as_ssa(X *x) {
read_argument(x);
while (x->n) {
x->n--;
}
}