From 353ee8baa096736f58ea63429b2436c99ae315ef Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Wed, 1 Oct 2025 11:33:47 +0100 Subject: [PATCH] C++: Port a test from the experimental directory to show that it works in the non-experimental "new" range analysis. --- cpp/ql/test/library-tests/ir/range-analysis/test.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cpp/ql/test/library-tests/ir/range-analysis/test.cpp b/cpp/ql/test/library-tests/ir/range-analysis/test.cpp index 7234449a4ed..0c1a98b06bb 100644 --- a/cpp/ql/test/library-tests/ir/range-analysis/test.cpp +++ b/cpp/ql/test/library-tests/ir/range-analysis/test.cpp @@ -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" + } } \ No newline at end of file