Merge pull request #14708 from MathiasVP/add-testcase-for-range-analysis

C++: Add range analysis testcase
This commit is contained in:
Mathias Vorreiter Pedersen
2023-11-07 15:15:45 +00:00
committed by GitHub

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--;
}
}