diff --git a/test-data/loop.yaml b/test-data/loop.yaml index dd6e76005..d6af4f4d8 100644 --- a/test-data/loop.yaml +++ b/test-data/loop.yaml @@ -440,3 +440,27 @@ post: - pc[2]=1 messages: [] + +--- +# Nested loops with inner infinite loop +test-case: nested loops with inner infinite loop +options: ["termination"] + +pre: + - "r0.type=number" + - "r0.svalue=0" + - "r0.uvalue=0" +code: + : | + r0 += 1 + if r0 > 10 goto + : | + if r0 > 0 goto + : | + exit + +post: [] +messages: + - "1:3: Code is unreachable after 1:3" + - "2: Loop counter is too large (pc[2] < 100000)" + - "2:3: Code is unreachable after 2:3" \ No newline at end of file