Open jafingerhut opened 2 weeks ago
@ChrisDodd Pinging you on this one, in case you have time to look at it.
The problem seems to happen in DoSimplifyDefUse -- it seems that it thinks the assignments to i
in the loop are dead (have no uses), so they get elimiinated. Not sure why that is happening.
I was writing some simple test cases of for loops to try out some aspects of this feature, and believe I have found a case where the compiler front end in some pass has an incorrect transformation, because the output of the front end, and thus also the mid end, appear functionally to be infinite loops, whereas the input program was definitely not.
I tested with two versions of p4c, the most recent of which was:
The command I used was:
The attached zip file contains the input P4 program, and the contents of the
tmp
directory created by the command above on my system. p4c-issue-4739.zip