1"""
2Test byteflow.py specific issues
3"""
4from numba.tests.support import TestCase
5from numba.core.compiler import run_frontend
6
7
8class TestByteFlowIssues(TestCase):
9    def test_issue_5087(self):
10        # This is an odd issue. The exact number of print below is
11        # necessary to trigger it. Too many or too few will alter the behavior.
12        # Also note that the function below will not be executed. The problem
13        # occurs at compilation. The definition below is invalid for execution.
14        # The problem occurs in the bytecode analysis.
15        def udt():
16            print
17            print
18            print
19
20            for i in range:
21                print
22                print
23                print
24                print
25                print
26                print
27                print
28                print
29                print
30                print
31                print
32                print
33                print
34                print
35                print
36                print
37                print
38                print
39
40                for j in range:
41                    print
42                    print
43                    print
44                    print
45                    print
46                    print
47                    print
48                    for k in range:
49                        for l in range:
50                            print
51
52                    print
53                    print
54                    print
55                    print
56                    print
57                    print
58                    print
59                    print
60                    print
61                    if print:
62                        for n in range:
63                            print
64                    else:
65                        print
66
67        run_frontend(udt)
68