xref: /php-src/ext/opcache/tests/jit/bug80959.phpt (revision c16ad918)
1--TEST--
2Bug #80959: infinite loop in building cfg during JIT compilation
3--EXTENSIONS--
4opcache
5--INI--
6opcache.enable=1
7opcache.enable_cli=1
8opcache.jit=tracing
9--FILE--
10<?php
11function test($a, $b) {
12    echo "Start\n";
13    $i = $j = 0;
14    do {
15        $i++;
16        try {
17           continue;
18        } catch (Exception $e) {
19        }
20        do {
21           $j++;
22        } while ($j < $b);
23    } while ($i < $a);
24    echo "Done $i $j\n";
25}
26test(5, 6);
27?>
28--EXPECT--
29Start
30Done 5 0
31